Hello im using a serial protocol and i need o calculate the length of some parte of message to send it as ascii, it is working but the size is inverter.
<Param id="40"> <Name>interval_command_len</Name> <Description>interval_command_len</Description> <Type>length</Type> <Interprete> <RawType>numeric text</RawType> <LengthType>fixed</LengthType> <Length>4</Length> <Type>double</Type> </Interprete> <Length> <Content> <Param>5</Param> <Param>6</Param> <Param>7</Param> </Content> </Length> </Param>
<Command id="5007"> <Name>Set GPS Config Command</Name> <Description>Set GPS Config Command</Description> <Content> <Param>2</Param> <Param>39</Param> <Param>39</Param> <Param>40</Param> <Param>39</Param> <Param>41</Param> <Param>38</Param> <Param>4227</Param> <Param>23</Param> </Content> </Command>
<Trigger id="5006"> <Name>before_timecomand_Command</Name> <On id="5007">command</On> <Time>before</Time> <Type>action</Type> <Content> <Id>1</Id> <--makecommand--> <Id>5006</Id> </Content> </Trigger>
<Action id="5006"> <Name>GetCommandLeng</Name> <On>command</On> <Type>length</Type> </Action> The size is calculated but should by "000x" format, also and Endian in action but the response was 0001 for 10 size
<img src="https://community.dataminer.services/wp-content/uploads/anspress-temp/f46317f4bbf69b198e38d41f9cf06a6ad6aef4d0_1668.png" />
Its posible calculate the correct format or have to use a qaction? Thanks
João Severino [SLC] [DevOps Catalyst] Answered question 3 days ago
Hi Juan,
Have you tried using the Endian option | DataMiner Docs in your length parameter definition?
But if that fails, you can indeed use a QAction to calculate it and store it in a read type parameter.
Juan Falcon [DevOps Member] Posted new comment 23 hours ago
Hi Joao, yes i try but that i dont understand is why is stating from the left, in that case 1 (1000) will be the same that 10 (1000) i thing something is wrong that i cant find the reason.
Regards