public void skip( Object endpoint_data, CdrInputStream src, boolean skip_encapsulation, boolean skip_sample, Object endpoint_plugin_qos) { int position = 0; if (skip_encapsulation) { src.skipEncapsulation(); position = src.resetAlignment(); } if (skip_sample) { src.skipString(); src.skipString(); org.openfmb.model.dds.rti.openfmb.commonmodule.EndDeviceControlTypeTypeSupport.get_instance() .skip(endpoint_data, src, false, true, endpoint_plugin_qos); org.openfmb.model.dds.rti.openfmb.commonmodule.DateTimeIntervalTypeSupport.get_instance() .skip(endpoint_data, src, false, true, endpoint_plugin_qos); org.openfmb.model.dds.rti.openfmb.commonmodule.SequenceOfEndDeviceControlSetPointsTypeSupport .get_instance() .skip(endpoint_data, src, false, true, endpoint_plugin_qos); } if (skip_encapsulation) { src.restoreAlignment(position); } }
public void serialize( Object endpoint_data, Object src, CdrOutputStream dst, boolean serialize_encapsulation, short encapsulation_id, boolean serialize_sample, Object endpoint_plugin_qos) { int position = 0; if (serialize_encapsulation) { dst.serializeAndSetCdrEncapsulation(encapsulation_id); position = dst.resetAlignment(); } if (serialize_sample) { EndDeviceControl typedSrc = (EndDeviceControl) src; dst.writeString(typedSrc.issueID, (255)); dst.writeString(typedSrc.name, (255)); org.openfmb.model.dds.rti.openfmb.commonmodule.EndDeviceControlTypeTypeSupport.get_instance() .serialize( endpoint_data, typedSrc.endDeviceControlType, dst, false, encapsulation_id, true, endpoint_plugin_qos); org.openfmb.model.dds.rti.openfmb.commonmodule.DateTimeIntervalTypeSupport.get_instance() .serialize( endpoint_data, typedSrc.scheduledInterval, dst, false, encapsulation_id, true, endpoint_plugin_qos); org.openfmb.model.dds.rti.openfmb.commonmodule.SequenceOfEndDeviceControlSetPointsTypeSupport .get_instance() .serialize( endpoint_data, typedSrc.setPoints, dst, false, encapsulation_id, true, endpoint_plugin_qos); } if (serialize_encapsulation) { dst.restoreAlignment(position); } }
public long get_serialized_sample_size( Object endpoint_data, boolean include_encapsulation, short encapsulation_id, long currentAlignment, Object sample) { EndDeviceControl typedSrc = (EndDeviceControl) sample; long origAlignment = currentAlignment; long encapsulation_size = currentAlignment; if (include_encapsulation) { if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) { throw new RETCODE_ERROR("Unsupported encapsulation"); } encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size); encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size); encapsulation_size -= currentAlignment; currentAlignment = 0; origAlignment = 0; } currentAlignment += CdrPrimitiveType.getStringSerializedSize(currentAlignment, typedSrc.issueID); currentAlignment += CdrPrimitiveType.getStringSerializedSize(currentAlignment, typedSrc.name); currentAlignment += org.openfmb.model.dds.rti.openfmb.commonmodule.EndDeviceControlTypeTypeSupport .get_instance() .get_serialized_sample_size( endpoint_data, false, encapsulation_id, currentAlignment, typedSrc.endDeviceControlType); currentAlignment += org.openfmb.model.dds.rti.openfmb.commonmodule.DateTimeIntervalTypeSupport.get_instance() .get_serialized_sample_size( endpoint_data, false, encapsulation_id, currentAlignment, typedSrc.scheduledInterval); currentAlignment += org.openfmb.model.dds.rti.openfmb.commonmodule .SequenceOfEndDeviceControlSetPointsTypeSupport.get_instance() .get_serialized_sample_size( endpoint_data, false, encapsulation_id, currentAlignment, typedSrc.setPoints); if (include_encapsulation) { currentAlignment += encapsulation_size; } return currentAlignment - origAlignment; }
public Object deserialize_sample( Object endpoint_data, Object dst, CdrInputStream src, boolean deserialize_encapsulation, boolean deserialize_sample, Object endpoint_plugin_qos) { int position = 0; if (deserialize_encapsulation) { src.deserializeAndSetCdrEncapsulation(); position = src.resetAlignment(); } if (deserialize_sample) { EndDeviceControl typedDst = (EndDeviceControl) dst; typedDst.clear(); try { typedDst.issueID = src.readString((255)); typedDst.name = src.readString((255)); typedDst.endDeviceControlType = (org.openfmb.model.dds.rti.openfmb.commonmodule.EndDeviceControlType) org.openfmb.model.dds.rti.openfmb.commonmodule.EndDeviceControlTypeTypeSupport .get_instance() .deserialize_sample( endpoint_data, typedDst.endDeviceControlType, src, false, true, endpoint_plugin_qos); typedDst.scheduledInterval = (org.openfmb.model.dds.rti.openfmb.commonmodule.DateTimeInterval) org.openfmb.model.dds.rti.openfmb.commonmodule.DateTimeIntervalTypeSupport .get_instance() .deserialize_sample( endpoint_data, typedDst.scheduledInterval, src, false, true, endpoint_plugin_qos); typedDst.setPoints = (org.openfmb.model.dds.rti.openfmb.commonmodule.SequenceOfEndDeviceControlSetPoints) org.openfmb.model.dds.rti.openfmb.commonmodule .SequenceOfEndDeviceControlSetPointsTypeSupport.get_instance() .deserialize_sample( endpoint_data, typedDst.setPoints, src, false, true, endpoint_plugin_qos); } catch (IllegalCdrStateException stateEx) { if (src.available() >= CdrEncapsulation.CDR_ENCAPSULATION_PARAMETER_ID_ALIGNMENT) { throw new RETCODE_ERROR( "Error deserializing sample! Remainder: " + src.available() + "\n" + "Exception caused by: " + stateEx.getMessage()); } } catch (Exception ex) { throw new RETCODE_ERROR(ex.getMessage()); } } if (deserialize_encapsulation) { src.restoreAlignment(position); } return dst; }