Skip to content
Snippets Groups Projects
Commit 25e69ee5 authored by J. M. Bailey's avatar J. M. Bailey
Browse files

VariableDatum datum length is bits, not bytes

parent 298b2266
No related branches found
No related tags found
No related merge requests found
......@@ -382,7 +382,7 @@ public class AllPduSender
{
VariableDatum newVariableDatum = new VariableDatum();
newVariableDatum.setVariableDatumValue (comment.getBytes()); // conversion
newVariableDatum.setVariableDatumLength(comment.getBytes().length); // housekeeping
newVariableDatum.setVariableDatumLength(comment.getBytes().length * 8); // bits, not bytes, see spec and javadoc
payloadList.add(newVariableDatum);
System.out.println(" \"" + comment + "\"");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment