Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PhGetConnectInfo()
Get information about a Photon channel
Synopsis:
PhConnectId_t PhGetConnectInfo(
PhConnectId_t coid,
PhConnectInfo_t *buf);
Library:
ph
Description:
This function fills *buf with information about the specified Photon channel. If coid is zero, information about the calling process is returned. If it isn't zero but doesn't match any existing channel, then the next monotonically greater channel ID is used. If coid is greater than any existing channel ID, -1 is returned and errno is set to ESRCH.
The PhConnectInfo_t structure includes at least the following members:
- unsigned long flags -- a combination of flags that describes the channel:
- Ph_PROC_VIRTUAL -- the process is the Photon server
- Ph_PROC_BLOCKED -- the process is "Reply-blocked" on a server (for example, pwm)
- Ph_PROC_HELD -- the process is held on someone else's queue
- PhChannelParms_t parms -- the channel's parameters; see PhAttach()
- PhConnectId_t block -- if Ph_PROC_BLOCKED is set, this is the ID of the server. Otherwise, if Ph_PROC_HELD is set, it's the ID of one of the apps whose event queue this process is trying to overflow. (It's possible for both these flags to be set if the application is multithreaded.)
- unsigned num_q_entries -- the number of events in the queue
- unsigned buf_len -- the size of the application's event buffer
- PhConnectId_t id -- the connector ID
- int nid -- the node descriptor
- pid_t pid -- the process ID
- unsigned long chev_sense -- the application's sensitivity to channel events
Returns:
The channel ID (the same as buf->id), or -1 if the call fails.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)