-- CPP module extracted from ITU-T Z.165 (03/2011)
using namespace ORG_ETSI_TTCN3_TRI;
class QualifiedName {
public:
~QualifiedName ();
const Tstring & getModuleName () const;
void setModuleName (const Tstring &mName);
const Tstring & getObjectName () const;
void setObjectName (const Tstring &oName);
Tstring toString () const;
Tboolean equals (const QualifiedName &qn) const;
QualifiedName * cloneQualifiedName () const;
Tboolean operator< (const QualifiedName &qn) const;
}
class TriAddress {
public:
virtual ~TriAddress ();
virtual const Tbyte *getEncodedData()const=0;
virtual void setEncodedData(const Tbyte *str, Tsize bitLen)=0;
virtual Tsize getBitsDataLen()const=0;
virtual Tboolean operator== (const TriAddress &add) const =0;
virtual TriAddress * cloneAddress () const =0;
virtual Tboolean operator< (const TriAddress &add) const =0;
}
class TriAddressList {
public:
virtual ~TriAddressList ();
virtual Tsize size () const =0;
virtual Tboolean isEmpty () const =0;
virtual const TriAddress & get (Tsize index) const =0;
virtual void clear ()=0;
virtual void add (const TriAddress &elem)=0;
virtual Tboolean operator== (const TriAddressList &addl) const =0;
virtual TriAddressList * cloneAddressList () const =0;
virtual Tboolean operator< (const TriAddressList &addl) const =0;
}
class TriComponentId {
public:
virtual ~TriComponentId ();
virtual const QualifiedName & getComponentTypeName () const =0;
virtual void setComponentTypeName (const QualifiedName &tName)=0;
virtual Tstring & getComponentName () const =0;
virtual void setComponentName (const Tstring &sName)=0;
virtual const Tinteger & getComponentId () const =0;
virtual void setComponentId (const Tinteger &id)=0;
virtual Tstring toString () const =0;
virtual Tboolean operator== (const TriComponentId &cmp) const =0;
virtual TriComponentId * cloneComponentId () const =0;
virtual Tboolean operator< (const TriComponentId &cmp) const =0;
}
class TriComponentIdList {
public:
virtual ~TriComponentIdList ();
virtual Tsize size () const =0;
virtual Tboolean isEmpty () const =0;
virtual const TriComponentId & get (Tsize index)const=0;
virtual void clear ()=0;
virtual void add (const TriComponentId &comp)=0;
virtual Tboolean operator== (const TriComponentIdList &cmpl) const =0;
virtual TriComponentIdList * cloneComponentIdList () const =0;
virtual Tboolean operator< (const TriComponentIdList &cmpl) const =0;
}
class TriException {
public:
virtual ~TriException ();
virtual const Tbyte *getData()const=0;
virtual void setData(const Tbyte *str, Tsize bitLen)=0;
virtual Tsize getBitsDataLen()const=0;
virtual Tstring toString()const=0;
virtual Tboolean operator== (const TriException &exc)const=0;
virtual TriException * cloneException () const =0;
virtual Tboolean operator< (const TriException &exc) const =0;
}
class TriFunctionId : QualifiedName {
public:
virtual ~TriFunctionId ();
virtual Tboolean operator== (const TriFunctionId &fid) const =0;
virtual TriFunctionId * cloneFunctionId () const =0;
virtual Tboolean operator< (const TriFunctionId &fid) const =0;
}
class TriMessage {
public:
virtual ~TriMessage ();
virtual const Tbyte *getData()const=0;
virtual void setData(const Tbyte *str, Tsize bitLen)=0;
virtual Tsize getBitsDataLen()const=0;
virtual Tstring toString()const=0;
virtual Tboolean operator== (const TriMessage &msg) const =0;
virtual TriMessage * cloneMessage () const =0;
virtual Tboolean operator< (const TriMessage &msg) const =0;
}
class TriParameter {
public:
virtual ~TriParameter ();
virtual const Tstring & getParameterName () const =0;
virtual void setParameterName (const Tstring &name)=0;
virtual const TriParameterPassingMode & getParameterPassingMode () const =0;
virtual void setParameterPassingMode (const TriParameterPassingMode &mode)=0;
virtual const Tbyte *getEncodedParameter()const=0;
virtual void setEncodedParameter(const Tbyte *str, Tsize bitLen)=0;
virtual Tsize getBitsDataLen()const=0;
virtual Tboolean operator== (const TriParameter &par) const =0;
virtual TriParameter * cloneParameter () const =0;
virtual Tboolean operator< (const TriParameter &par) const =0;
}
class TriParameterList {
public:
virtual ~TriParameterList ();
virtual Tsize size () const =0;
virtual Tboolean isEmpty () const =0;
virtual const TriParameter & get (Tsize index) const =0;
virtual void clear ()=0;
virtual void add (const TriParameter ¶meter)=0;
virtual Tboolean operator== (const TriParameterList &pml) const =0;
virtual TriParameterList * cloneParameterList () const =0;
virtual Tboolean operator< (const TriParameterList &pml) const =0;
}
typedef enum
{
IN = 0,
OUT = 1,
INOUT = 2
}
TriParameterPassingMode;
class TriPortId {
public:
virtual ~TriPortId (void);
virtual const Tstring & getPortName () const =0;
virtual void setPortName (const Tstring &pName)=0;
virtual const TriComponentId & getComponent () const =0;
virtual void setComponent (const TriComponentId &comp)=0;
virtual Tsize getPortIndex () const =0;
virtual void setPortIndex (Tsize index)=0;
virtual const QualifiedName & getPortType () const =0;
virtual void setPortType (const QualifiedName &pType)=0;
virtual Tboolean isArray () const =0;
virtual Tboolean operator== (const TriPortId &prt) const =0;
virtual TriPortId * clonePortId () const =0;
virtual Tboolean operator< (const TriPortId &prt) const =0;
}
class TriPortIdList {
public:
virtual ~TriPortIdList ();
virtual Tsize size () const =0;
virtual bool isEmpty () const =0;
virtual const TriPortId & get (Tsize index) const =0;
virtual void clear ()=0;
virtual void add (const TriPortId &elem)=0;
virtual Tboolean operator== (const TriPortIdList &prtl) const =0;
virtual TriPortIdList * clonePortIdList () const =0;
virtual Tboolean operator< (const TriPortIdList &prtl) const =0;
}
class TriSignatureId : QualifiedName {
public:
virtual ~TriSignatureId ();
virtual Tboolean operator== (const TriSignatureId &sid) const =0;
virtual TriSignatureId * cloneSignatureId () const =0;
virtual Tboolean operator< (const TriSignatureId &sid) const =0;
}
typedef enum
{
TRI_OK = 0,
TRI_ERROR = -1
} TriStatus;
class TriTestCaseId : QualifiedName {
public:
virtual ~TriTestCaseId ();
virtual Tboolean operator== (const TriTestCaseId &tcid) const =0;
virtual TriTestCaseId * cloneTestCaseId () const =0;
virtual Tboolean operator< (const TriTestCaseId &tcid) const =0;
}
class TriTimerDuration {
public:
virtual ~TriTimerDuration ();
virtual Tfloat getDuration () const =0;
virtual void setDuration (Tfloat duration)=0;
virtual Tboolean operator== (const TriTimerDuration &timd) const =0;
virtual TriTimerDuration * cloneTimerDuration () const =0;
virtual Tboolean operator< (const TriTimerDuration &timd) const =0;
}
class TriTimerId {
public:
virtual ~TriTimerId ();
virtual const Tstring & getTimerName () const =0;
virtual void setTimerName (const Tstring &tName)=0;
virtual const Tinteger getTId() const =0;
virtual Tboolean operator== (const TriTimerId &tmid) const =0;
virtual TriTimerId * cloneTimerId () const =0;
virtual Tboolean operator< (const TriTimerId &tmid) const =0;
}
class TriCommunicationSA {
public:
//Destructor.
virtual ~TriCommunicationSA ();
//To reset the System Adaptor
virtual TriStatus triSAReset ()=0;
//To execute a test case.
virtual TriStatus triExecuteTestCase (const TriTestCaseId *testCaseId, const TriPortIdList *tsiPortList)=0;
//To establish a dynamic connection between two ports.
virtual TriStatus triMap (const TriPortId *comPortId, const TriPortId *tsiPortId)=0;
//To close a dynamic connection to the SUT for the referenced TSI port.
virtual TriStatus triUnmap (const TriPortId *comPortId, const TriPortId *tsiPortId)=0;
//To end a test case.
virtual TriStatus triEndTestCase ()=0;
//Send operation on a component which has been mapped to a TSI port.
virtual TriStatus triSend (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddress *SUTaddress, const TriMessage *sendMessage)=0;
//Send (broadcast) operation on a component which has been mapped to a TSI port.
virtual TriStatus triSendBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriMessage *sendMessage)=0;
//Send (multicast) operation on a component which has been mapped to a TSI port.
virtual TriStatus triSendMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddressList *SUTaddresses, const TriMessage *sendMessage)=0;
//Initiate the procedure call.
virtual TriStatus triCall (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddress *sutAddress, const TriSignatureId *signatureId, const TriParameterList *parameterList)=0;
//Initiate and broadcast the procedure call.
virtual TriStatus triCallBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriSignatureId *signatureId, const TriParameterList *parameterList)=0;
//Initiate and multicast the procedure call.
virtual TriStatus triCallMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddressList *sutAddresses, const TriSignatureId *signatureId, const TriParameterList *parameterList)=0;
//Issue the reply to a procedure call.
virtual TriStatus triReply (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddress *sutAddress, const TriSignatureId *signatureId, const TriParameterList * parameterList, const TriParameter *returnValue)=0;
//Broadcast the reply to a procedure call.
virtual TriStatus triReplyBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriSignatureId *signatureId, const TriParameterList *parameterList, const TriParameter *returnValue)=0;
//Multicast the reply to a procedure call.
virtual TriStatus triReplyMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddressList *sutAddresses, const TriSignatureId *signatureId, const TriParameterList *parameterList, const TriParameter *returnValue)=0;
//Raise an exception to a procedure call.
virtual TriStatus triRaise (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddress *sutAddress, const TriSignatureId *signatureId, const TriException *exc)=0;
//Raise an broadcast an exception to a procedure call.
virtual TriStatus triRaiseBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriSignatureId *signatureId, const TriException *exc)=0;
//Raise an multicast an exception to a procedure call.
virtual TriStatus triRaiseMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriAddressList *sutAddresses, const TriSignatureId *signatureId, const TriException *exc)=0;
//Initiate the described actions to be taken on the SUT.
virtual TriStatus triSUTactionInformal (const Tstring *description)=0;
}
class TriCommunicationTE {
public:
//Destructor.
virtual ~TriCommunicationTE ();
//Called by SA after it has received a message from the SUT.
virtual void triEnqueueMsg (const TriPortId *tsiPortId, const TriAddress *SUTaddress, const TriComponentId *componentId, const TriMessage *receivedMessage)=0;
//Called by SA after it has received a procedure call from the SUT.
virtual void triEnqueueCall (const TriPortId *tsiPortId, const TriAddress *SUTaddress, const TriComponentId *componentId, const TriSignatureId *signatureId, const TriParameterList *parameterList)=0;
//Called by SA after it has received a reply from the SUT.
virtual void triEnqueueReply (const TriPortId *tsiPortId, const TriAddress *SUTaddress, const TriComponentId *componentId, const TriSignatureId *signatureId, const TriParameterList *parameterList, const TriParameter *returnValue)=0;
//Called by SA after it has received an exception from the SUT.
virtual void triEnqueueException (const TriPortId *tsiPortId, const TriAddress *SUTaddress, const TriComponentId *componentId, const TriSignatureId *signatureId, const TriException *exc)=0;
}
class TriPlatformPA {
public:
//Destructor.
virtual ~TriPlatformPA ();
//Reset all timing activities which it is currently performing.
virtual TriStatus triPAReset ()=0;
//Start the indicated timer with the indicated duration.
virtual TriStatus triStartTimer (const TriTimerId *timerId, const TriTimerDuration *timerDuration)=0;
//Stop the indicated timer.
virtual TriStatus triStopTimer (const TriTimerId *timerId)=0;
//Use the timerId to access the time that elapsed since this timer was started.
virtual TriStatus triReadTimer (const TriTimerId *timerId, TriTimerDuration *elapsedTime)=0;
//Use the timerId to access the status of the timer.
virtual TriStatus triTimerRunning (const TriTimerId *timerId, Tboolean * running)=0;
//For each external function specified in the TTCN-3 ATS implement the behaviour.
virtual TriStatus triExternalFunction (const TriFunctionId *functionId, TriParameterList *parameterList, TriParameter *returnValue)=0;
}
class TriPlatformTE {
public:
//Destructor.
virtual ~TriPlatformTE ();
//Notfiy the timeout of the timer.
virtual void triTimeout (const TriTimerId *timerId)=0;
}