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

VariableDatum datum length is bits, not bytes

parent 25e69ee5
No related branches found
No related tags found
No related merge requests found
......@@ -383,6 +383,8 @@ public class AllPduSender
VariableDatum newVariableDatum = new VariableDatum();
newVariableDatum.setVariableDatumValue (comment.getBytes()); // conversion
newVariableDatum.setVariableDatumLength(comment.getBytes().length * 8); // bits, not bytes, see spec and javadoc
// alternatively, you do not need to set this and the marshaller will figure it out from the byte array
// (see javadoc for VariableDatum.setVariableDatumLength())
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