Class AbstractTransceiver
java.lang.Object
org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
- All Implemented Interfaces:
org.opentrafficsim.base.Identifiable,TransceiverInterface
- Direct Known Subclasses:
AbstractEventTransceiver,AbstractIdTransceiver,CrossSectionElementTransceiver,LaneGtuIdTransceiver,LinkGtuIdTransceiver,LinkTransceiver,NodeTransceiver,Publisher,SimulatorStateTransceiver
Common code for most implementations of TranceiverInterface.
Copyright (c) 2020-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTransceiver(String id, org.djutils.metadata.MetaData addressFields, org.djutils.metadata.MetaData resultFields) Construct a new AbstractTransceiver. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.djutils.metadata.MetaDataSpecification of arguments needed in a request.final StringgetId()final org.djutils.metadata.MetaDataReport the specification of a result of the transceiver.toString()static StringverifyMetaData(org.djutils.metadata.MetaData metaData, Object[] address) Verify the composition of an Object[].Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.sim0mq.publisher.TransceiverInterface
get, getIdSource, hasIdSource
-
Constructor Details
-
AbstractTransceiver
public AbstractTransceiver(String id, org.djutils.metadata.MetaData addressFields, org.djutils.metadata.MetaData resultFields) Construct a new AbstractTransceiver.- Parameters:
id- String; the id of the new AbstractTransceiveraddressFields- MetaData; description of the elements of an address that thegetmethod of this AbstractTransceiver can handleresultFields- MetaData; description of the result of thegetmethod
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.opentrafficsim.base.Identifiable
-
getAddressFields
public final org.djutils.metadata.MetaData getAddressFields()Specification of arguments needed in a request.- Specified by:
getAddressFieldsin interfaceTransceiverInterface- Returns:
- MetaData; the specification of arguments needed in a request
-
getResultFields
public final org.djutils.metadata.MetaData getResultFields()Report the specification of a result of the transceiver.- Specified by:
getResultFieldsin interfaceTransceiverInterface- Returns:
- MetaData; the specification of a result from the transceiver
-
verifyMetaData
Verify the composition of an Object[].- Parameters:
metaData- MetaData; the expected compositionaddress- Object[]; the object array that must be verified- Returns:
- String; null if metaData is OK; descriptive text on error
-
toString
-