I am trying to understand what exactly what this function is doing.
This is a code for Modbus communication.
I recognize that the user is trying to write to several holding registers ie
modbusTCPClient.wrtie(16). The 16 being a function code for write to multiple registers.
anyways if someone could help me decifer the operators on the
modbusTCPClient.write( address & 0xFF );
modbusTCPClient.write( dataLen >> 8 );
modbusTCPClient.write( dataLen & 0xFF );
modbusTCPClient.write( dataLen * 2 );
for ( byte i = 0; i < dataLen; i++ ) {
modbusTCPClient.write( data[i] >> 8 );
modbusTCPClient.write( data[i] & 0xFF );
that would be great.
the function is called in the code as
Alrighty.
well thanks for the quick response.
perhaps its 40000 in base 10 .That would be 16 bit or one word.
And perhaps this is just a "Shifty" way of taking the lower byte of a word
and doing some arithmetic.???