All Frameworks Class Hierarchy This Framework Previous Next Indexes
System Interface CATICommMsg
System.IUnknown
|
+---CATICommMsg
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICommMsg
Interface to access the backbone messages services.
Role: This interface provides methods to handle backbone messages.
It is implemented by the CATBBMessage component. Since your message component derives from this component, it inherits
the implementation of CATICommMsg, and you don't need to implement it.
In most cases, the
SetMessageClass and
SetMessageSpecifiers methods should be called in the
CATIStreamMsg.SetMessageSpecifications method.
Method Index
- o
Answers(CATICommMsg*)
- Allows the message receiver to answer a message.
- o
GetDestinatorHost(char**)
- Gets DestinatorHost.
- o
GetDestinatorUser(char**)
- Gets DestinatorUser.
- o
GetMessageClass(CATMessageClass*)
-
Returns the backbone message class name.
- o
GetMessageSpecifiers(CATMessageSpecifiers*)
-
Returns the message specifiers.
- o
GetRequestID()
- Gets the RequestID.
- o
SetDestinatorHost(char*)
- Set DestinatorHost.
- o
SetDestinatorUser(char*)
- Set DestinatorUser.
- o
SetMessageClass(CATMessageClass)
- Sets the backbone message class name.
- o
SetMessageSpecifiers(CATMessageSpecifiers)
- Sets the message specifiers.
Methods
o Answers
-
Allows the message receiver to answer a message.
Role: A message sender may request that a message needs an answer.
Such messages' specifiers include CATMsgSpec_AnswerNeeded.
To answer, the message receiver should just create a new message that contains
the answer, and call Answsers.
- Parameters:
-
- iAnswer
- The backbone message object representing the answer
- Example:
- Suppose that you have received the message MyReceivedMessage that requests
an answer.
...
if (MyReceivedMessage->GetSpecifiers() == CATMsgSpec_AnswerNeeded)
{
... // Create a new message that contains the answer and ask for
... // a pointer to CATICommsg: piCommMsgOnAnswer
MyReceivedMessage->Answers(piCommMsgOnAnswer)
...
o GetDestinatorHost
public virtual HRESULT GetDestinatorHost( | char** | oHost)=0 |
-
Gets DestinatorHost.
This method permits to get the destinator bus.
o GetDestinatorUser
public virtual HRESULT GetDestinatorUser( | char** | oUser)=0 |
-
Gets DestinatorUser.
This method permits to get the destinator user.
o GetMessageClass
-
Returns the backbone message class name.
Role:The message sender has specified the message class name.
- Parameters:
-
- oClassName
- The returned message class name
Deletion of the returned oClassName is under the responsibility
of the caller of GetMessageClass
The returned oClassName must be deleted by delete []
when it does not
o GetMessageSpecifiers
-
Returns the message specifiers.
- Parameters:
-
- oMsgSpecifiers
- The specifiers of the message
- See also:
- CATMessageSpecifiers
o GetRequestID
public virtual int GetRequestID( | )=0 |
-
Gets the RequestID.
This method returns the RequestID.
o SetDestinatorHost
public virtual HRESULT SetDestinatorHost( | const char* | iHost)=0 |
-
Set DestinatorHost.
This method permits to specify the destinator bus.
o SetDestinatorUser
public virtual HRESULT SetDestinatorUser( | const char* | iUser)=0 |
-
Set DestinatorUser.
This method permits to specify the destinator user.
o SetMessageClass
-
Sets the backbone message class name.
Role: The message class name is used to create the message using its name,
thanks to the
CATInstantiateComponent global function that uses the
CATICreateInstance interface implemented by the message component. To enable for this, the message class name must be declared by the message sender.
Use this method in the
CATIStreamMsg.SetMessageSpecifications method.
- Parameters:
-
- iMsgClass
- The message class name
o SetMessageSpecifiers
-
Sets the message specifiers.
Role: The application that sends the message can set options or specifiers
to the message, such as a request for an answer.
Use this method in the
CATIStreamMsg.SetMessageSpecifications method.
- Parameters:
-
- iMsgSpecifiers
- A mask giving the specifiers of the message.
Several values may be given combined by "binary OR" logical operator
- See also:
- CATMessageSpecifiers
This object is included in the file: CATICommMsg.h
If needed, your Imakefile.mk should include the module: CATSysCommunication