Programmers Reference - Data Servers (1)
The Data Servers
The data servers is the binding layer between the transport layer, and the devices. It is the data server that knows how to handle the data at device level. It is also the data servers that, based on the information in the data request, knows where, and when, to transmit data.
Data server instances
The data servers exist as many different instances, and does not have the ability to store persistent data. There is three important categories of data servers in the system. All these is derived from a single base class (CDataServer). The bottom level data server is the CDeviceServer which handles all direct access to the devices. The second class is not intended as a base class for other data servers. The CPacketServer is used for grouping data together into lists of data. This data server is used when a client wants to have access to more than one parameter at a time. The third kind of data server is used for routing data from the kernel on this machine to the kernel on a remote machine. The data server acts as a client on the remote machine, and uses the CConSysClient class internally. For further reference se CClientServer.
Data server events
When a data server is created it gets a handle to an event. This handle is used by the data server to signal that it has important data. When the data server pulses the event, it may expect that its Data function will be called within a short time period. The time frame of this depends two things. The work load on the computer is of course a significant factor. But especially when the computer has a big workload, the priority of the data requested is a important factor. The priority of the request is decided by the security context of the client. Each user on the system must be a member of one ore more groups defined in the registry. For each of these groups there is defined a read and a write priority. When the client program (using the security context of the user) request data, the thread read and write priorities is obtained. When a data server pulses the event, the read thread will service data server with the read priority from the registry. In the same manner, date to the data server will be delivered with the priority of the write entry in the registry.
Data server priorities
- THREAD_PRIORITY_IDLE: Data servers running at this level will only be served when no other data servers are pending.
- THREAD_PRIORITY_LOWEST: The lowest normal priority.
- THREAD_PRIORITY_BELOW_NORMAL: Just below the standard priority.
- THREAD_PRIORITY_NORMAL: The standard priority.
- THREAD_PRIORITY_ABOVE_NORMAL: Just above the standard priority.
- THREAD_PRIORITY_HIGHEST: The highest priority for normal operation.
- THREAD_PRIORITY_TIME_CRITICAL: This priority suspends all
other operation in the kernel. Excessive use of this data server
priority may interfere with the operation system.
Reference:
Last Modified 11 January 2019