Source code directory for knob controller software ----------------------------------------------------------------- Main program files: knobCtrl.c/.h. Tasks: - Initiate communication with clients who wish to control devices with knobs. As we are the server and support multiple dynamic clients, we just create a means to receive requests. Once a request is actually received, we save information about the client. - Initiate communication with knobs. - Await messages from clients who wish to control devices with knobs. - Execute requests from clients: attach device, detach device, update knob legend, etc. - Create separate thread for each knob box. That thread requests latest knob turns count. If turns are not zero, send message to clients (who will then update the real device's value). Also write any pending legend updates. Byte order is handled here. For communication with knobs, we do not need to worry about byte order because the data is sent in a serial byte stream and the value of each byte is defined in the message protocol. For communication with clients, byte order may be an issue because messages may be sent over the network to hosts with different endianness and we have several multi-byte integers embedded in our message protocol. Use callbacks to handle this. ----------------------------------------------------------------- Routines to communicate with clients: knobCtrlClntComm.c/.h Tasks: - Initialize means to listen for requests from clients - Use callbacks to receive/send messages supported by our msg protocol: attach, detach, etc. ----------------------------------------------------------------- Routines to communicate with knobs: knobCtrlComm.c/.h Tasks: - Intialize communication with knobs - Use callbacks to receive send messages supported by our msg protocol: request turns, update legend, etc. ----------------------------------------------------------------- Assumptions: Each box has 4 knobs. Each instance of program (soft ioc) supports 1 'line' of up to 16 knob boxes.