-- CPP module extracted from ITU-T Z.165.1 (05/2012)
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;
}
typedef enumerated {
e_char = 1, // character
e_unsigned_char = 2, // unsigned char
e_signed_char = 3, // signed char
e_short = 4, // short signed integer
e_short_int = 5, // short signed integer
e_signed_short = 6, // short signed integer
e_signed_short_int = 7, // short signed integer
e_unsigned_short = 8, // unsigned short
e_unsigned_short_int = 9, // unsigned short integer
e_int = 10, // integer
e_signed_int = 11, // signed integer
e_unsigned = 12, // unsigned
e_unsigned_int = 13, // unsigned integer
e_long = 14, // long integer
e_long_int = 15, // long integer
e_signed_long = 16, // signed long integer
e_signed_long_int = 17, // signed long integer
e_unsigned_long = 18, // unsigned long integer
e_unsigned_long_int = 19, // unsigned long integer
e_long_long = 20, // long long integer
e_long_long_int = 21, // long long integer
e_signed_long_long = 22, // signed long long integer
e_signed_long_long_int = 23, // signed long long integer
e_unsigned_long_long = 24, // unsigned long long integer
e_unsigned_long_long_int = 25, // unsigned long long integer
e_float = 26, // float
e_double = 27, // double
e_long_double = 28, // long double
e_ptr = 29 // void *
} type_kind;
typedef void *value;
typedef struct {
type_kind tag,
value val
} Object;
class xTriCommunicationSA {
public:
//Destructor.
virtual ~xTriCommunicationSA ();
//To reset the System Adaptor
virtual xTriStatus triSAReset ()=0;
//To establish a dynamic connection between two ports.
virtual TriStatus xtriMapParam (const TriPortId *comPortId, const TriPortId *tsiPortId, const
TciParameterList *parameterList)=0;
//To close a dynamic connection to the SUT for the referenced TSI port.
virtual TriStatus xtriUnmapParam (const TriPortId *comPortId, const TriPortId *tsiPortId, const
TciParameterList *parameterList)=0;
//Send operation on a component which has been mapped to a TSI port.
virtual TriStatus xtriSend (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValue *SUTaddress, const TciValue *sendMessage)=0;
//Send (broadcast) operation on a component which has been mapped to a TSI port.
virtual TriStatus xtriSendBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValue *sendMessage)=0;
//Send (multicast) operation on a component which has been mapped to a TSI port.
virtual TriStatus xtriSendMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValueList *SUTaddresses, const TciValue *sendMessage)=0;
//Initiate the procedure call.
virtual TriStatus xtriCall (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValue *sutAddress, const TriSignatureId *signatureId, const TciParameterList *parameterList)=0;
//Initiate and broadcast the procedure call.
virtual TriStatus xtriCallBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriSignatureId *signatureId, const TciParameterList *parameterList)=0;
//Initiate and multicast the procedure call.
virtual TriStatus xtriCallMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValueList *sutAddresses, const TriSignatureId *signatureId, const TciParameterList *parameterList)=0;
//Issue the reply to a procedure call.
virtual TriStatus xtriReply (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValue *sutAddress, const TriSignatureId *signatureId, const TciParameterList * parameterList, const TciValue *returnValue)=0;
//Broadcast the reply to a procedure call.
virtual TriStatus xtriReplyBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriSignatureId *signatureId, const TciParameterList *parameterList, const TciValue *returnValue)=0;
//Multicast the reply to a procedure call.
virtual TriStatus xtriReplyMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValueList *sutAddresses, const TriSignatureId *signatureId, const TciParameterList *parameterList, const TciValue *returnValue)=0;
//Raise an exception to a procedure call.
virtual TriStatus xtriRaise (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValue *sutAddress, const TriSignatureId *signatureId, const TciValue *exc)=0;
//Raise a broadcast an exception to a procedure call.
virtual TriStatus xtriRaiseBC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TriSignatureId *signatureId, const TciValue *exc)=0;
//Raise a multicast an exception to a procedure call.
virtual TriStatus xtriRaiseMC (const TriComponentId *componentId, const TriPortId *tsiPortId, const TciValueList *sutAddresses, const TriSignatureId *signatureId, const TciValue *exc)=0;
}
class xTriCommunicationTE {
public:
//Destructor.
virtual ~xTriCommunicationTE ();
//Called by SA after it has received a message from the SUT.
virtual void xtriEnqueueMsg (const TriPortId *tsiPortId, const Object *SUTaddress, const TriComponentId *componentId, const Object *receivedMessage)=0;
//Called by SA after it has received a procedure call from the SUT.
virtual void xtriEnqueueCall (const TriPortId *tsiPortId, const Object *SUTaddress, const TriComponentId *componentId, const TriSignatureId *signatureId, const TciParameterList *parameterList)=0;
//Called by SA after it has received a reply from the SUT.
virtual void xtriEnqueueReply (const TriPortId *tsiPortId, const Object *SUTaddress, const TriComponentId *componentId, const TriSignatureId *signatureId, const TciParameterList *parameterList, const TciValue *returnValue)=0;
//Called by SA after it has received an exception from the SUT.
virtual void xtriEnqueueException (const TriPortId *tsiPortId, const Object *SUTaddress, const TriComponentId *componentId, const TriSignatureId *signatureId, const Object *exc)=0;
// Miscellaneous operations
virtual TciValue xtriConvert(const Object *value, const TciType *typeHypothesis)=0;
}
class xTriPlatformPA {
public:
//Destructor.
virtual ~TriPlatformPA ();
//For each external function specified in the TTCN-3 ATS implement the behaviour.
virtual TriStatus xtriExternalFunction (const TriFunctionId *functionId, TciParameterList *parameterList, TciValue *returnValue)=0;
}
class TriPlatformTE {
public:
//Destructor.
virtual ~TriPlatformTE ();
//Notfiy the timeout of the timer.
virtual void triTimeout (const TriTimerId *timerId)=0;
}