RTPS protocol message analysis method and device in DDS communication
Through the combination of hashid table based on IDL file and wireshark lua plug-in, efficient parsing of RTPS protocol in DDS communication is achieved, the problem of low parsing efficiency of existing tools is solved, and rapid protocol parsing and testing efficiency improvement in the automotive field is achieved.
Patent Information
- Application Number
- CN202410998383.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-08
AI Technical Summary
The existing DDS protocol analysis tools lack mature and fast resolution support in the automotive field, resulting in slow resolution and low testing efficiency. Especially when there is a bug in the real car, you need to power off and power on to obtain the TopicInformation information of the RTPS protocol.
Through the hashid table that defines the service method based on the IDL file, use the lua plug-in in wireshark to convert the service method to the lua language type, obtain the issueData data and judge the service type, determine the hashid location, jump to the corresponding service method function to perform analysis, and add the service Methods and parameter fields are used to the protocol tree and subtree to realize the parsing of RTPS protocol packets.
Without increasing network bandwidth and controller memory, the analysis of the original packet is realized, simplifying the use process, avoiding the dependence on the initialization of the controller's power-on, and parsing the RTPS protocol is only required, which is convenient and No need to change the wireshark protocol code.
Smart Images

Figure CN118921415A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of DDS communication, and in particular to a method and device for parsing RTPS protocol messages in DDS communication. Background Art
[0002] At present, the form of automobile controllers is changing from traditional distributed E / E architecture to service-oriented architecture SOA. The electrical architecture of the controller is centered on domain control and Ethernet communication is used as a carrier, realizing the service-oriented function of the whole vehicle. The number of functions and services will increase. For the iterative development rhythm, the efficiency of testing and debugging is particularly important.
[0003] The current system architecture solutions all use Ethernet and middleware as carriers. Most middleware OEMs use protocols such as SOME / IP and DDS. Among them, SOME / IP is a standardized product with mature test tool support such as CANOE. Wireshark itself can also support SOME / IP, but when supporting the DDS protocol, Wireshark only implements rtps layer parsing, but does not implement parsing of "submessageID: DATA" below the rtps layer. DDS (Data Distribution Service) is a well-known standard for data-centric publish-subscribe communication in real-time distributed systems. Since DDS is not a standard protocol in the automotive field, each OEM has a different definition method, resulting in the industry having no mature tools to quickly support protocol parsing, resulting in slow service data parsing, low testing efficiency and other problems.
[0004] To solve the above problems, the prior art discloses a solution which reads the TopicInformation in the RTPS protocol in the DDS communication data packet, finds the constructed structure of the corresponding type, reads the SerializedData in the RTPS protocol in the data packet, and parses the binary data according to the structure. However, the solution must obtain the TopicInformation in the RTPS protocol in the data packet to implement the parsing. This information is sent when the controller is powered on and initialized. If a bug occurs in the actual vehicle, the tool must be powered off and then on to obtain this information, and its usage scenarios are limited. Summary of the invention
[0005] The present application provides a method and device for parsing RTPS protocol messages in DDS communication, which is based on the Ethernet original message forward protocol and can complete the parsing of the original message without increasing the network bandwidth or consuming the controller memory.
[0006] In a first aspect, an embodiment of the present application provides a method for parsing RTPS protocol messages in DDS communication, and the method for parsing RTPS protocol messages in DDS communication comprises the following steps:
[0007] Based on the service methods defined in the IDL file, define the hashid table for each service type, where the hashid is used to map the corresponding service method;
[0008] Use the Lua plug-in deployed in Wireshark to convert the service method defined in the IDL file into a Lua language type service method function according to the format of the hashid table;
[0009] Use the Lua plug-in to obtain the issueData data from the RTPS interface and assign it to the payload data, and determine the service type based on the payload data;
[0010] Determine the location of hashid according to the service type and find the corresponding service method function, jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter fields to the protocol tree and subtree.
[0011] In combination with the first aspect, in one implementation, the service method defined in the IDL file includes a request service type, a reply service type, and a notify service type.
[0012] In combination with the first aspect, in one implementation, determining the service type according to the payload data includes:
[0013] Determine the fixed byte position according to the protocol header, fix a number of bytes after the fixed byte to form a fixed field, and determine the fixed field value in decimal of the fixed field;
[0014] If the fixed field value is equal to 1, it is determined to be a request service type;
[0015] If the fixed field value is equal to 0, it is determined to be the reply service type;
[0016] If the fixed field value is greater than 1, it is determined to be a notify service type.
[0017] In combination with the first aspect, in one implementation, determining the location of the hashid according to the service type and finding the corresponding service method function includes:
[0018] If it is a request service type, remove the protocol header and then offset the first fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0019] If the service type is reply, remove the protocol header and then offset the second fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0020] If the service type is notify, the 4 bytes after the protocol header offset are the location of the hashid, and the corresponding service method function is found based on the hashid.
[0021] In combination with the first aspect, in one implementation, before adding the corresponding service method and parameter field to the protocol tree and subtree, it also includes:
[0022] Calculate the offset based on the input parameters, output parameters and corresponding data types of the service method, and define a 4-byte alignment function to fill invalid bytes.
[0023] In a second aspect, an embodiment of the present application provides a device for parsing RTPS protocol messages in DDS communication, characterized in that the device for parsing RTPS protocol messages in DDS communication includes:
[0024] The setting module defines the hashid table of each service type based on the service method defined in the IDL file, where the hashid is used to map the corresponding service method;
[0025] A lua plug-in is deployed in Wireshark, and is used to convert the service method defined in the IDL file into a service method function of the lua language type according to the format of the hashid table;
[0026] The lua plug-in is also used to obtain issueData data from the RTPS interface and assign it to payload data, and determine the service type according to the payload data;
[0027] The lua plug-in is also used to determine the location of the hashid according to the service type and find out the corresponding service method function, jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter field to the protocol tree and subtree.
[0028] In conjunction with the second aspect, in one implementation, the service method defined in the IDL file includes a request service type, a reply service type, and a notify service type.
[0029] In conjunction with the second aspect, in one implementation, the Lua plug-in determines the service type according to the payload data, including:
[0030] Determine the fixed byte position according to the protocol header, fix a number of bytes after the fixed byte to form a fixed field, and determine the fixed field value in decimal of the fixed field;
[0031] If the fixed field value is equal to 1, it is determined to be a request service type;
[0032] If the fixed field value is equal to 0, it is determined to be the reply service type;
[0033] If the fixed field value is greater than 1, it is determined to be a notify service type.
[0034] In conjunction with the second aspect, in one implementation, the Lua plug-in determines the location of the hashid according to the service type and finds out the corresponding service method function, including:
[0035] If it is a request service type, remove the protocol header and then offset the first fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0036] If the service type is reply, remove the protocol header and then offset the second fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0037] If the service type is notify, the 4 bytes after the protocol header offset are the location of the hashid, and the corresponding service method function is found based on the hashid.
[0038] In conjunction with the second aspect, in one implementation, the method further includes a calculation module, wherein the calculation module is used to:
[0039] Calculate the offset based on the input parameters, output parameters and corresponding data types of the service method, and define a 4-byte alignment function to fill invalid bytes.
[0040] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0041] The RTPS protocol message parsing method in DDS communication in the present application defines a hashid table for each service type based on the service method defined in the IDL file, wherein the hashid is used to map the corresponding service method; the service method defined in the IDL file is converted into a service method function of the Lua language type according to the format of the hashid table by using the Lua plug-in deployed in Wireshark; the issueData data is obtained from the RTPS interface by using the Lua plug-in and assigned to the payload data, and the service type is determined according to the payload data; the location of the hashid is determined according to the service type and the corresponding service method function is found, the corresponding service method function is jumped to perform parsing, and the corresponding service method and parameter fields are added to the protocol tree and subtree.
[0042] This implements the original message forward protocol based on Ethernet, without increasing network bandwidth or consuming controller memory, and completes the parsing of the original message. On the other hand, this application does not need to change the existing protocol code of Wireshark, and only needs to add the Lua plug-in to the installation directory to use it, which is convenient to use. In addition, the parsing process does not rely on the controller power-on initialization, and the TopicInformation of the RTPS protocol in the sent data can be parsed with only valid data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a flow chart of an embodiment of a method for parsing RTPS protocol messages in DDS communication of the present application;
[0044] Figure 2 It is a schematic diagram of the data structure of the service method in the original DDS message;
[0045] Figure 3 This is a schematic diagram after analysis of this application;
[0046] Figure 4 This is a structural block diagram of an embodiment of an RTPS protocol message parsing device in DDS communication of the present application. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0049] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0050] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0051] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0052] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0053] In a first aspect, an embodiment of the present application provides a method for parsing RTPS protocol messages in DDS communication.
[0054] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of a method for parsing RTPS protocol messages in DDS communication of this application. Figure 1 As shown, the RTPS protocol message parsing method in DDS communication includes:
[0055] S1. Based on the service methods defined in the IDL file, define the hashid table of each service type, where the hashid is used to map the corresponding service method;
[0056] S2. Use the Lua plug-in deployed in Wireshark to convert the service method defined in the IDL file into a service method function of the Lua language type according to the format of the hashid table;
[0057] It is worth mentioning that IDL (Interactive Data Language) is a programming language used for data analysis, image processing and data visualization. In the general service definition file, the message structure defined by IDL is serialized into a binary byte stream for transmission, which makes the data packet unable to be parsed.
[0058] This application obtains basic service information and converts it into a service function in Lua language, that is, the service structure defined in the IDL file is defined in Lua language. Each service needs to define the corresponding field method in the Lua script, and the parameters buffer, offset, para_tree, and field_name are passed in the method.
[0059] After the service method is parsed, the offset needs to be matched. The offset is calculated based on the service method input parameters, output parameters and corresponding data types, and the invalid bytes are filled through the 4-byte alignment function. Combined with the 4 bytes after filtering the header information in the Ethernet message, it is hashid. After converting it to decimal, the key-value pair form is looked up in the table to call the service method function represented by the corresponding hashid to realize data parsing. The data structure of the service method in the original DDS message is as follows Figure 2 shown.
[0060] In this embodiment, the service method example defined by the IDL file is as follows:
[0061]
[0062] In addition, this embodiment also defines a 4-byte alignment function to facilitate the calculation of the offset, and defines functions of data types such as int8, uint8, int16, uint16, int32, uint32, int64, uint64, float, double, boolean, string, etc. in turn. The functions of these data types are also used to calculate the offset.
[0063] In this embodiment, the service methods defined in the IDL file include request service type, reply service type, and notify service type. After the above main service method is defined, the hashid table is defined next, namely the three types of hashid tables of request, reply, and notify, which are all represented by key-value pairs.
[0064] Specifically, use parsers_request = {[four bytes converted to decimal] = {name = 'service name + method name_Hash', parser = parse_service name_method name_request}, ...} to define the request service type, and define the service function, namely service name_method name_request_f = ProtoField.none ("service name_method name_requeset", "service name_method name_request", base.None), and add the service method to the protocol, fields = {service name_method name_request_f, ...};
[0065] Use parsers_reply = {[four bytes to decimal] = {name = 'service name + method name_Hash', parser = parse_service name_method name_reply}, ...} to define the reply service type, and define the service method, namely service name_method name_reply_f = ProtoField.none ("service name_method name_reply", "service name_method name_reply", base.None), and then add the service method to the protocol, fields = {service name_method name_reply_f, ...};
[0066] Use parsers_notify = {[four bytes converted to decimal] = {name = 'service name + method name_Hash', parser = parse_service name_method name_notify}, ...} to define the notify service type, and define the service method, namely service name_method name_notify_f = ProtoField.none("service name_method name_notify", "service name_method name_notify", base.None), and then add the service method to the protocol, fields = {service name_method name_notify_f, ...}.
[0067] The purpose of step S2 is to convert all service methods defined in IDL into service method functions defined in Lua syntax. Since Wireshark also supports Lua plug-in tools for custom protocol parsing, it is only necessary to deploy the developed Lua plug-in in the plugins subdirectory of the installation directory. Wireshark is an open source network protocol analysis tool that allows users to capture and interactively browse traffic on a computer network.
[0068] Specifically, the services defined in the IDL file are encoded using the LUA language according to the above format. The following is an example: ...
[0070]
[0071]
[0072] It can be understood that in this embodiment, the hashid of all services is created into table-type key-value pairs according to these three types. Each hashid maps the corresponding service method. When the original message is subsequently obtained and parsed into the hashid, it can jump to the service method function defined in the Lua plug-in according to the IDL to add the corresponding service method and parameter fields, thereby realizing the parsing of the original message service method and parameters.
[0073] S3. Use the Lua plug-in to obtain the issueData data from the RTPS interface and assign it to the payload data, and determine the service type based on the payload data;
[0074] S4. Determine the location of hashid according to the service type and find the corresponding service method function, jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter fields to the protocol tree and subtree.
[0075] After completing the preparations of steps S1 and S2, the original message parsing formal process, namely the above-mentioned Lua file parsing algorithm part, is entered.
[0076] First, Wireshark supports the RTPS interface in the Lua plug-in. IssueData data is obtained from the RTPS interface and assigned to the payload data. Since the data structures of the request service type, reply service type, and notify service type in the original message are obviously different and regular, after getting the payload data, the protocol header is from zero to the fixed byte position. All service protocol headers are the same. The value of a few bytes after a certain byte is fixed to determine the service type. After the type is locked, the position of the hashid is also confirmed, so that you can jump to the service method function corresponding to the hashid to add the corresponding service field to the protocol tree. Since the service method itself also defines the input parameters, output parameters and corresponding data types, the offset is calculated, and then the corresponding field is added to the protocol subtree structure, thereby realizing the parsing of the original message. The schematic diagram after parsing is as follows Figure 3 shown.
[0077] In specific implementation, the service type is determined based on the payload data, including:
[0078] The fixed byte position is determined according to the protocol header, several bytes after the fixed byte are fixed to form a fixed field, and the fixed field value in decimal of the fixed field is determined; it is worth noting that the number of bytes forming the fixed field can be reasonably set according to needs, and this embodiment does not impose any restrictions here.
[0079] If the fixed field value is equal to 1, it is determined to be a request service type; if the fixed field value is equal to 0, it is determined to be a reply service type; if the fixed field value is greater than 1, it is determined to be a notify service type.
[0080] After determining the service type, you can determine the location of the hashid based on the specific type. Specifically:
[0081] If it is a request service type, remove the protocol header and then offset the first fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0082] If the service type is reply, remove the protocol header and then offset the second fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0083] If the service type is notify, the 4 bytes after the protocol header offset are the location of the hashid, and the corresponding service method function is found based on the hashid.
[0084] Finally, you can jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter fields to the protocol tree and subtree by calculating the offset of the parameters.
[0085] To summarize, the RTPS protocol message parsing method in DDS communication in the present application defines a hashid table for each service type based on the service method defined in the IDL file, wherein the hashid is used to map the corresponding service method; the service method defined in the IDL file is converted into a service method function of the Lua language type according to the format of the hashid table by using the Lua plug-in deployed in Wireshark; the issueData data is obtained from the RTPS interface by using the Lua plug-in and assigned to the payload data, and the service type is determined according to the payload data; the location of the hashid is determined according to the service type and the corresponding service method function is found, jumping to the corresponding service method function to perform parsing, and the corresponding service method and parameter fields are added to the protocol tree and subtree.
[0086] This implements the original message forward protocol based on Ethernet, without increasing network bandwidth or consuming controller memory, and completes the parsing of the original message. On the other hand, this application does not need to change the existing protocol code of Wireshark, and only needs to add the Lua plug-in to the installation directory to use it, which is convenient to use. In addition, the parsing process does not rely on the controller power-on initialization, and the TopicInformation of the RTPS protocol in the sent data can be parsed with only valid data.
[0087] In a second aspect, an embodiment of the present application also provides a device for parsing RTPS protocol messages in DDS communication.
[0088] In one embodiment, referring to Figure 4 , Figure 4 This is a functional module diagram of an embodiment of an RTPS protocol message parsing device in DDS communication of this application. Figure 4 As shown, the RTPS protocol message parsing device in DDS communication includes:
[0089] The setting module defines the hashid table of each service type based on the service method defined in the IDL file, where the hashid is used to map the corresponding service method;
[0090] A lua plug-in is deployed in Wireshark, and is used to convert the service method defined in the IDL file into a service method function of the lua language type according to the format of the hashid table;
[0091] The lua plug-in is also used to obtain issueData data from the RTPS interface and assign it to payload data, and determine the service type according to the payload data;
[0092] The lua plug-in is also used to determine the location of the hashid according to the service type and find out the corresponding service method function, jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter field to the protocol tree and subtree.
[0093] Furthermore, in one embodiment, the service methods defined in the IDL file include a request service type, a reply service type, and a notify service type.
[0094] Further, in one embodiment, the Lua plug-in determines the service type according to the payload data, including:
[0095] Determine the fixed byte position according to the protocol header, fix a number of bytes after the fixed byte to form a fixed field, and determine the fixed field value in decimal of the fixed field;
[0096] If the fixed field value is equal to 1, it is determined to be a request service type;
[0097] If the fixed field value is equal to 0, it is determined to be the reply service type;
[0098] If the fixed field value is greater than 1, it is determined to be a notify service type.
[0099] Further, in one embodiment, the Lua plug-in determines the location of the hashid according to the service type and finds the corresponding service method function, including:
[0100] If it is a request service type, remove the protocol header and then offset the first fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0101] If the service type is reply, remove the protocol header and then offset the second fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid;
[0102] If the service type is notify, the 4 bytes after the protocol header offset are the location of the hashid, and the corresponding service method function is found based on the hashid.
[0103] Furthermore, in one embodiment, a calculation module is further included, and the calculation module is used to:
[0104] Calculate the offset based on the input parameters, output parameters and corresponding data types of the service method, and define a 4-byte alignment function to fill invalid bytes.
[0105] Among them, the functional implementation of each module in the above-mentioned RTPS protocol message parsing device in DDS communication corresponds to the steps in the above-mentioned RTPS protocol message parsing method embodiment in DDS communication, and its functions and implementation processes are no longer repeated here one by one.
[0106] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for parsing RTPS protocol messages in DDS communication, characterized in that: The RTPS protocol message parsing method in the DDS communication comprises the following steps: Based on the service methods defined in the IDL file, define the hashid table for each service type, where the hashid is used to map the corresponding service method; Use the Lua plug-in deployed in Wireshark to convert the service method defined in the IDL file into a Lua language type service method function according to the format of the hashid table; Use the Lua plug-in to obtain the issueData data from the RTPS interface and assign it to the payload data, and determine the service type based on the payload data; Determine the location of hashid according to the service type and find the corresponding service method function, jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter fields to the protocol tree and subtree.
2. The method for parsing RTPS protocol messages in DDS communication according to claim 1, characterized in that: The service methods defined in the IDL file include request service type, reply service type, and notify service type.
3. The method for parsing RTPS protocol messages in DDS communication according to claim 2, characterized in that: The determining of the service type according to the payload data includes: Determine the fixed byte position according to the protocol header, fix a number of bytes after the fixed byte to form a fixed field, and determine the fixed field value in decimal of the fixed field; If the fixed field value is equal to 1, it is determined to be a request service type; If the fixed field value is equal to 0, it is determined to be the reply service type; If the fixed field value is greater than 1, it is determined to be a notify service type.
4. The method for parsing RTPS protocol messages in DDS communication according to claim 2 or 3, characterized in that: Determining the location of the hashid according to the service type and finding the corresponding service method function includes: If it is a request service type, remove the protocol header and then offset the first fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid; If the service type is reply, remove the protocol header and then offset the second fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid; If the service type is notify, the 4 bytes after the protocol header offset are the location of the hashid, and the corresponding service method function is found based on the hashid.
5. The method for parsing RTPS protocol messages in DDS communication according to claim 1, characterized in that: Before adding the corresponding service method and parameter field to the protocol tree and subtree, it also includes: Calculate the offset based on the input parameters, output parameters and corresponding data types of the service method, and define a 4-byte alignment function to fill invalid bytes.
6. A device for parsing RTPS protocol messages in DDS communication, characterized in that: The RTPS protocol message parsing device in the DDS communication includes: The setting module defines the hashid table of each service type based on the service method defined in the IDL file, where the hashid is used to map the corresponding service method; A lua plug-in is deployed in Wireshark, and is used to convert the service method defined in the IDL file into a service method function of the lua language type according to the format of the hashid table; The lua plug-in is also used to obtain issueData data from the RTPS interface and assign it to payload data, and determine the service type according to the payload data; The lua plug-in is also used to determine the location of the hashid according to the service type and find out the corresponding service method function, jump to the corresponding service method function to perform parsing, and add the corresponding service method and parameter field to the protocol tree and subtree.
7. The RTPS protocol message parsing device in DDS communication as claimed in claim 6, characterized in that: The service methods defined in the IDL file include request service type, reply service type, and notify service type.
8. The RTPS protocol message parsing device in DDS communication as claimed in claim 7, characterized in that: The lua plug-in determines the service type according to the payload data, including: Determine the fixed byte position according to the protocol header, fix a number of bytes after the fixed byte to form a fixed field, and determine the fixed field value in decimal of the fixed field; If the fixed field value is equal to 1, it is determined to be a request service type; If the fixed field value is equal to 0, it is determined to be the reply service type; If the fixed field value is greater than 1, it is determined to be a notify service type.
9. The RTPS protocol message parsing device in DDS communication according to claim 7 or 8, characterized in that: The Lua plug-in determines the location of the hashid according to the service type and finds the corresponding service method function, including: If it is a request service type, remove the protocol header and then offset the first fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid; If the service type is reply, remove the protocol header and then offset the second fixed length value by 4 bytes to find the hashid position, and find the corresponding service method function based on the hashid; If the service type is notify, the 4 bytes after the protocol header offset are the location of the hashid, and the corresponding service method function is found based on the hashid.
10. The RTPS protocol message parsing device in DDS communication according to claim 6, characterized in that: Also included is a calculation module, the calculation module is used to: Calculate the offset based on the input parameters, output parameters and corresponding data types of the service method, and define a 4-byte alignment function to fill invalid bytes.
