3. Session Layer


Careplane Logical Sources | Data Transmission Modes


Careplane Logical Sources

Before data transmission can proceed, the host must specify:

Each bedside monitor on the network has a pre-defined Logical Bed Number associated with it. In order to access data on the network, the host program must define a number of Logical Sources. Up to 127 logical sources may be defined, each with its own set of data.
For example, suppose that the host wishes to record all parameter value data from Bed 10. A Connect Request message is sent, the format of which is as follows:


 // Connect Logical Source Request, Length = 14 bytes
 struct ConLSReq {
 byte	MsgID,		// id = 00
 	LSN,		// 3-0 logical source number
 	Mode,		// 0=Poll, 1-0xFE=Sched.Automatic,
 			// 0xFF=Continuous automatic
 	AuxMode,	// b7=IAF (1=inh),b6=AModeSel,b5-0=Sched Period
 	Contype,	// must be 0
 	LB8to1,		// logical beds 1-8
 	LB16to9,	// logical beds 16-9
	LB24to17,	// logical beds 24-17
 	Com_Mon,	// bit2=incl.computer data,bit1=incl.monitor data
 	DataClass1,	// bits7-0: WV,WSD,IT,AT,PSD,PV,AS,IS
 	DataClass2,	// bits2-0=PNI,BL,TOD
 	MFC,		// 0=All codes, 1-0x3F=specific MFC
 	PSLO,		// 0=All PSLO, 1-0x3F=specific PSLO
 	Misc;		// bit7=ECG CMPR,6=TOD source, 2-0 WLP
 };

The Connect Request must be the first message sent to Careplane, defining the Logical Source. A default request may be defined, which is then modified according to the requirements for a particular source:

 // default connect logical source request
 ConLSReq DefConLSReq = {	// default connect logical source request
   0x00,			// ID = 00
   0x00,			// LSN=0
   0x00,			// Mode=POLL
   0x00,			// IAF=0(enable),Const auto/sched auto
   0x00,			// Con type (must be 0)
   0x00,			// no beds selected
   0x00,
   0x00,
   0x01,			// include monitors but not computers
   0x00,			// no data classes
   0x00,
   0x00,			// include all MFC's
   0x00,			// include all PSLO's
   0x01				// wave list position =1
 };

To create a logical source with parameter value data from bed 10, the following request is sent:

ConLSReq PVReq = DefConLSReq;
PVReq.LSN = 0x01;		// logical source 1
PVReq.LB16to9 = 0x02;		// logical bed 10
PVReq.DataClass1 = 0x0C;	// Parameter Value and Parameter Support Data
PVReq.Mode = 0xFF;		// Automatic Transmission Mode

The address of PVReq is then passed to the DLCL for transmission to the shared memory. If the request is accepted, Careplane responds with an acknowledgement, and data transmission begins immediately. The host may specify that the source is connected, but data transmission is inhibited until an Activate Logical Source request is sent. Similarly, an active source may be suspended by sending a Suspend Logical Source request. Neither message is used in this application, and they will not be discussed further. Finally, when a source is no longer required a Disconnect Logical Source request is sent. If successful, Careplane acknowledges the request and terminates data transmission from all logical beds defined in the source. In summary, the Session Layer provides the following services for Logical Sources:

The connection of a single logical source is illustrated in Fig. 3.1

Figure 3.1 Connection of a Logical Source

Data Transmission Modes

Careplane has 2 transmission modes:

Poll Mode

This is the simplest method of data transmission. For a source connected in poll mode, Careplane provides buffering of the data. When a poll request is made, Careplane transmits the most recently acquired data. In the example given above, the user has defined a source for parameter value data from logical bed 10. To connect the source in poll mode, the mode field of the request is modified to: PVReq.Mode = 0x00; When connected in poll mode, the user must wait at least one system cycle (1024 ms) before the complete set of parameter value data are available. The sequence for acquiring the data is therefore:

// Connect Logical Source
ConnectLS(&PVReq);
// Wait for Careplane to acquire data
sleep(2);
// Poll for the most recent data
PollLS(1);

Polling provides 'snapshot' capture of data. It is used to determine the number of active beds on the network, described in detail in chapter 4.

Automatic Mode

If the user wishes to acquire data continuously, the source must be connected in automatic mode. There are 2 variants: scheduled and continuous. In continuous mode, data is transmitted in a continuous stream from the moment of connection (unless immediate activation is inhibited) until a Disconnect request is received. Scheduled mode allows the source to be switched on and off according to a schedule period defined in the connect request. Continuous automatic mode is a prerequisite for wave data acquisition.