ENHANCEMENT REQUEST: notify server application about new camonitor client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Won't Fix
|
Wishlist
|
mdavidsaver |
Bug Description
camonitor tool can be used to monitor values which are stored in IOC database. Sometimes it would be very useful that final server application would be aware of when new a client has started to monitor certain values from data base.
In cas module this feature has already been implemented by allowing server application to be notified through casPV::
...
req_server() // thread function which listen sockets and instantiate monitor server threads..
{
while (true) {
}
}
camsgtask()
{
while (running && client is not disconnected) {
...
}
}
camessage()
{
......
// when camonitor is invoked with the specified list of PV then for each specified PV
// an internal function event_add_action() is called which setup notification for it
//
....
}
create_
{
client = create_client() // instantiate client data structure
....... // finalize client initialization
status = db_start_events ( client->evuser, "CAS-event", NULL, NULL, priorityOfEvents ); // fork event_task() thread
.......
}
event_task()
{
while (not finished) {
wait for PV value changes
}
}
event_add_action (..... struct client *client)
{
// this function setup notification for individual client
<<<==== at this place a callback function would be appreciate to inform epics server application someone has started to
}
summary: |
- notify server application about new camonitor client + ENHANCEMENT REQUEST: notify server application about new camonitor + client |
The rsrv code does not provide a documented public API — it is too tightly coupled into the IOC database to easily use it with other software. We have not been putting any effort into this code in recent years and some time in the future it may be replaced, but if you would like to develop a patch to implement what you're suggesting and explain what you are using it for we will consider merging it.