ProviewR Programmer's Reference Manual
V6.1.4
|
Functions | |
int | qcom_AidCompare (const qcom_sAid *a1, const qcom_sAid *a2) |
Compare two application identities;. More... | |
pwr_tBoolean | qcom_AidIsEqual (const qcom_sAid *a1, const qcom_sAid *a2) |
Test if two application identities are equal. More... | |
pwr_tBoolean | qcom_AidIsNotEqual (const qcom_sAid *a1, const qcom_sAid *a2) |
Test if two application identities are different. More... | |
pwr_tBoolean | qcom_AidIsNotNull (const qcom_sAid *a) |
Test if application identity is not null. More... | |
pwr_tBoolean | qcom_AidIsNull (const qcom_sAid *a) |
Test if application identity is null. More... | |
void * | qcom_Alloc (pwr_tStatus *sts, unsigned int size) |
Allocate a buffer in the qcom pool. | |
pwr_tBoolean | qcom_AttachQ (pwr_tStatus *sts, const qcom_sQid *qid) |
Attach to an allready created queue. | |
pwr_tBoolean | qcom_Bind (pwr_tStatus *sts, const qcom_sQid *myQ, const qcom_sQid *toQ) |
Bind one queue to another. More... | |
pwr_tBoolean | qcom_CreateQ (pwr_tStatus *sts, qcom_sQid *myQ, qcom_sQattr *attr, const char *qname) |
Create a queue and make an implicit connect to it. | |
pwr_tBoolean | qcom_DeleteQ (pwr_tStatus *sts, const qcom_sQid *myQ) |
Delete a queue. Delete a queue and release all resources held by the queue. | |
pwr_tBoolean | qcom_WaitAnd (pwr_tStatus *status, const qcom_sQid *qid, const qcom_sQid *eid, int mask, int tmo) |
Wait for an event or a message. More... | |
pwr_tBoolean | qcom_WaitOr (pwr_tStatus *status, const qcom_sQid *qid, const qcom_sQid *eid, int mask, int tmo, int *event) |
Wait for an event or a message. More... | |
pwr_tBoolean | qcom_Exit (pwr_tStatus *sts) |
Disconnect from QCom. Disconnects an application from the Qcom message bus, all resources such as, queue, messages andbindings, held by the application will be released. | |
pwr_tBoolean | qcom_Free (pwr_tStatus *sts, void *buffer) |
Free a previously allocated buffer. | |
pwr_tBoolean | qcom_Init (pwr_tStatus *sts, qcom_sAid *aid, const char *aname) |
Connect to QCom. More... | |
void * | qcom_Get (pwr_tStatus *sts, const qcom_sQid *myQ, qcom_sGet *get, int tmo_ms) |
Get a new message. More... | |
qcom_tBus | qcom_MyBus (pwr_tStatus *sts) |
Get the current qcom bus number. | |
pwr_tBoolean | qcom_MyNode (pwr_tStatus *sts, qcom_sNode *node) |
Get the local qcom node. | |
char * | qcom_NodeName (pwr_tNodeId nid) |
Get the name of a qcom node. | |
pwr_tBoolean | qcom_Node (pwr_tStatus *sts, qcom_sNode *node, pwr_tNodeId nid) |
Get qcom node from node identity. | |
pwr_tBoolean | qcom_NextNode (pwr_tStatus *sts, qcom_sNode *node, pwr_tNodeId nid) |
Get the next qcom node. If nid is pwr_cNNodeId the first node is returned. More... | |
pwr_tBoolean | qcom_Put (pwr_tStatus *sts, const qcom_sQid *receiver, qcom_sPut *put) |
Put a new message. More... | |
int | qcom_QidCompare (const qcom_sQid *q1, const qcom_sQid *q2) |
Compare two queue identities;. More... | |
pwr_tBoolean | qcom_QidIsEqual (const qcom_sQid *q1, const qcom_sQid *q2) |
Test if two queue identities are equal. More... | |
pwr_tBoolean | qcom_QidIsNotEqual (const qcom_sQid *q1, const qcom_sQid *q2) |
Test if two queue identities are different. More... | |
pwr_tBoolean | qcom_QidIsNull (const qcom_sQid *q) |
Test if queue identity is null. More... | |
pwr_tBoolean | qcom_QidIsNotNull (const qcom_sQid *q) |
Test if queue identity is not null. More... | |
char * | qcom_QidToString (char *s, qcom_sQid *qid, int prefix) |
Converts a queue identifier, 'qid' to a string. More... | |
pwr_tBoolean | qcom_Reply (pwr_tStatus *sts, qcom_sGet *get, qcom_sPut *put) |
Reply to a qcom_Request. The qcom_Reply() call looks almost like a qcom_Put(), but the queue id is replaced with a qcom_sGet. Applications must agree on using qcom_Request/qcom_Reply, using a qcom_Put to reply on a qcom_Request will not work. | |
void * | qcom_Request (pwr_tStatus *sts, const qcom_sQid *receiver, qcom_sPut *put, const qcom_sQid *myQ, qcom_sGet *get, int tmo_ms, pwr_tBitMask flags) |
Put a request and return the reply. More... | |
pwr_tBoolean | qcom_Unbind (pwr_tStatus *sts, const qcom_sQid *myQ, const qcom_sQid *fromQ) |
Disconnect a target queue from a bound source queue. More... | |
void | qcom_LinkConnect (pwr_tNodeId nid) |
void | qcom_LinkDisconnect (pwr_tNodeId nid) |
Compare two application identities;.
return <0 if aid_1 < aid_2
return 0 if aid_1 == aid_2
return >0 if aid_1 > aid_2.
Definition at line 932 of file rt_qcom.c.
References qcom_sAid::aix, and qcom_sAid::nid.
pwr_tBoolean qcom_AidIsEqual | ( | const qcom_sAid * | a1, |
const qcom_sAid * | a2 | ||
) |
Test if two application identities are equal.
return true if aid_1 == aid_2
return false if aid_1 != aid_2.
Definition at line 955 of file rt_qcom.c.
References qcom_sAid::aix, and qcom_sAid::nid.
pwr_tBoolean qcom_AidIsNotEqual | ( | const qcom_sAid * | a1, |
const qcom_sAid * | a2 | ||
) |
Test if two application identities are different.
return true if aid_1 != aid_2
return false if aid_1 == aid_2.
Definition at line 968 of file rt_qcom.c.
References qcom_sAid::aix, and qcom_sAid::nid.
pwr_tBoolean qcom_AidIsNotNull | ( | const qcom_sAid * | a | ) |
Test if application identity is not null.
return true if aid != qcom_cNAid
return false if aid == qcom_cNAid.
Definition at line 993 of file rt_qcom.c.
References qcom_sAid::nid.
pwr_tBoolean qcom_AidIsNull | ( | const qcom_sAid * | a | ) |
Test if application identity is null.
return true if aid == qcom_cNAid
return false if aid != qcom_cNAid.
Definition at line 981 of file rt_qcom.c.
References qcom_sAid::nid.
pwr_tBoolean qcom_Bind | ( | pwr_tStatus * | status, |
const qcom_sQid * | tqid, | ||
const qcom_sQid * | sqid | ||
) |
void* qcom_Get | ( | pwr_tStatus * | status, |
const qcom_sQid * | qid, | ||
qcom_sGet * | gp, | ||
int | tmo | ||
) |
pwr_tBoolean qcom_Init | ( | pwr_tStatus * | status, |
qcom_sAid * | aid, | ||
const char * | aname | ||
) |
Connect to QCom.
Before using Qcom an application must connect to Qcom. The application has an identity and name. The identity is generated by Qcom and is returned in 'aid'. If 'name' is a null pointer the application will be given the name 'unknown name'. Every message sent from an application contains the application identity and the identity can be read by the receiving application.
Applications using GDH, MH_APPL or MH_OUTUNIT do not have to call qcom_Init(), it is done inside the gdh_Init() and mh_OutunitConnect() calls.
void qcom_LinkConnect | ( | pwr_tNodeId | nid | ) |
void qcom_LinkDisconnect | ( | pwr_tNodeId | nid | ) |
pwr_tBoolean qcom_NextNode | ( | pwr_tStatus * | status, |
qcom_sNode * | node, | ||
pwr_tNodeId | nid | ||
) |
Get the next qcom node. If nid is pwr_cNNodeId the first node is returned.
Example
pwr_tBoolean qcom_Put | ( | pwr_tStatus * | status, |
const qcom_sQid * | qidp, | ||
qcom_sPut * | pp | ||
) |
Put a new message.
When sending a message an application can use private data, allocated on the stack, head, or static memory, or allocate data from the Qcom pool.
Internally Qcom will allocate a buffer from the pool and copy user data to that buffer. Another way is to use a buffer allocated from the pool.
Qcom checks if the buffer is allocated in the pool or not.
Compare two queue identities;.
return <0 if qid_1 < qid_2
return 0 if qid_1 == qid_2
return >0 if qid_1 < qid_2.
Definition at line 858 of file rt_qcom.c.
References qcom_sQid::nid, and qcom_sQid::qix.
pwr_tBoolean qcom_QidIsEqual | ( | const qcom_sQid * | q1, |
const qcom_sQid * | q2 | ||
) |
Test if two queue identities are equal.
return true if qid_1 == qid_2
return false if qid_1 != qid_2.
Definition at line 880 of file rt_qcom.c.
References qcom_sQid::nid, and qcom_sQid::qix.
pwr_tBoolean qcom_QidIsNotEqual | ( | const qcom_sQid * | q1, |
const qcom_sQid * | q2 | ||
) |
Test if two queue identities are different.
return true if qid_1 != qid_2
return false if qid_1 == qid_2.
Definition at line 892 of file rt_qcom.c.
References qcom_sQid::nid, and qcom_sQid::qix.
pwr_tBoolean qcom_QidIsNotNull | ( | const qcom_sQid * | q | ) |
Test if queue identity is not null.
return true if qid_1 != qcom_cNQid
return false if qid_1 == qcom_cNQid.
Definition at line 918 of file rt_qcom.c.
References qcom_sQid::nid.
pwr_tBoolean qcom_QidIsNull | ( | const qcom_sQid * | q | ) |
Test if queue identity is null.
return true if qid_1 == qcom_cNQid
return false if qid_1 != qcom_cNQid.
Definition at line 905 of file rt_qcom.c.
References qcom_sQid::nid.
char* qcom_QidToString | ( | char * | s, |
qcom_sQid * | qid, | ||
int | prefix | ||
) |
Converts a queue identifier, 'qid' to a string.
The output string will be in the format:
0.1.2.3:1234
If 's' is non null the resultant string will be catenated to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_Q' prefix will be included in the resultant string.
Definition at line 1199 of file rt_qcom.c.
References qcom_sQid::nid, cdh_uOid::o, cdh_uOid::pwr, qcom_sQid::qix, and cdh_mOid::vid_3.
void* qcom_Request | ( | pwr_tStatus * | status, |
const qcom_sQid * | pqid, | ||
qcom_sPut * | pp, | ||
const qcom_sQid * | gqid, | ||
qcom_sGet * | gp, | ||
int | tmo, | ||
pwr_tBitMask | flags | ||
) |
Put a request and return the reply.
The qcom_Request() call combines qcom_Put() and qcom_Get() in one call, and the application is guaranteed that at the return from qcom_Request() it either has the correct reply on the request or a time out. Internal to the qcom_Request() call, Qcom filters away any stray responses.
The request should be answered with a qcom_Reply().
pwr_tBoolean qcom_Unbind | ( | pwr_tStatus * | status, |
const qcom_sQid * | sqid, | ||
const qcom_sQid * | tqid | ||
) |
pwr_tBoolean qcom_WaitAnd | ( | pwr_tStatus * | status, |
const qcom_sQid * | qid, | ||
const qcom_sQid * | eid, | ||
int | mask, | ||
int | tmo | ||
) |
pwr_tBoolean qcom_WaitOr | ( | pwr_tStatus * | status, |
const qcom_sQid * | qid, | ||
const qcom_sQid * | eid, | ||
int | mask, | ||
int | tmo, | ||
int * | event | ||
) |