Headers¶
Datex Header¶
All requests use this header:
Byte No | Description |
1 | Start flag: FRAMECHAR |
2 | (start of header) Total length = 0031h = 49d bytes (word r_len) |
3 | |
4 | Reserved, set to zero (byte res1) |
5 | Ignored by monitor, set to zero (byte r_dri_level) |
6 | Reserved = 0000H (byte res2[2]) |
7 | |
8 | Transmission time = 0x00000000, ignored by monitor when sending transmission request (dword r_time). However, time can be meaningful in outputted messages, which use the header of the same structure (dword r_time). |
9 | |
10 | |
11 | |
12 | Reserved = 00000000H (dword res3) |
13 | |
14 | |
15 | |
16 | Main type of record = DRI_MT_PHDB = 0 (r_maintype) |
17 | |
18 | Offset to the first subrecord = 0000H (sr_desc[0].offset) |
19 | |
20 | Type of first subrecord, DRI_PH_XMIT_REQ = 0 (sr_desc[0].sr_type) |
21 | Offset to the second subrecord = 0000H, calculated from the beginning of the data area after the header part. Value is not meaningful, since there is only one subrecord in the request (sr_desc[1].offset). |
22 | |
23 | “No more subrecords” (sr_desc[1].sr_type) |
24 | sr_desc[2].offset = 000, no meaning since only one subrecord transmitted. sr_desc[2].sr_type, no meaning |
25 | |
26 | |
27 | sr_desc[3].offset = 000, no meaning sr_desc[3].sr_type, no meaning |
28 | |
29 | |
30 | sr_desc[4].offset = 000, no meaning sr_desc[4].sr_type, no meaning |
31 | |
32 | |
33 | sr_desc[5].offset = 000, no meaning sr_desc[5].sr_type, no meaning |
34 | |
35 | |
36 | sr_desc[6].offset = 000, no meaning sr_desc[6].sr_type, no meaning |
37 | |
38 | |
39 | sr_desc[7].offset = 000, no meaning sr_desc[7].sr_type = 0, no meaning |
40 | |
41 |
-
class
pycollect.headers.
DatexHeaderRequest
(*args, **kwargs)[source]¶ Bases:
pycollect.headers.HeaderHandler
Header for request transfer.
This header is the combination of Datex Header and the follow header:
Byte No Description 42 Request current values of physiological database = DRI_PH_DISPL (field phdb_rcrd_type of struct phdb_req) 43 Transmission interval in seconds = 00A, i.e., send current values of physiological database every 10 seconds (field tx_interval of struct phdb_req) 44 45 reserved[0] of struct phdb_req, must be zeroed 46 47 reserved[1] of struct phdb_req, must be zeroed 48 49 reserved[2] of struct phdb_req, must be zeroed 50 51 Checksum 52 End flag: FRAMECHAR
-
class
pycollect.headers.
DatexHeaderResponse
(*args, **kwargs)[source]¶ Bases:
pycollect.headers.HeaderHandler
The data transmitted from monitor is writed in this header.
This header is the combination of Datex Header and the follow header, is used for store the waveforms inputs.
Byte No Description 42-1491 Data 1492 Checksum 1493 End flag: FRAMECHAR
-
class
pycollect.headers.
DatexHeaderWaveRequest
(*args, **kwargs)[source]¶ Bases:
pycollect.headers.HeaderHandler
Header for request wave transfer.
This header is the combination of Datex Header and the follow header, is user for create the recuest of waveforms.
Byte No Description 42 Request type: one of WF_REQ_CONT_START, WF_REQ_CONT_STOP or WF_REQ_TIMED_START. 43 44 Duration of snapshot 45 46-53 An array of the requested waveform subrecords. There is room for up to 8 waveforms, but the monitor sends only the waveforms that fit within the 600 samples/s limitation and ignores the rest. The type array must be terminated using the DRI_EOL_SUBR_LIST constant (0xFF), unless there are 8 waveforms is the request. 54-73 Reserved 74 Checksum 75 End flag: FRAMECHAR
-
class
pycollect.headers.
HeaderHandler
(data=None, init=None, size=None)[source]¶ Bases:
object
Header Handler.
Establish a way to read and write GE protocol headers.
-
__getitem__
(element)[source]¶ Return value from header.
Parameters: element (str) – Define de index and the format of requested value. Returns: Target element, could be of many types due to the nested suported format. Return type: int, list, HeaderHandler Note
- recursive format:
- header[‘basic:ecg:hr’]
- reverse the byte array before to read:
- header[‘-basic:ecg:hr’]
- return the byte array without convert to integer:
- header[‘basic:ecg:hr,’]
- return the boolean for the bit 4:
- header[‘basic:ecg:hr:4]
- return the integer generated with the bits 0 to 5:
- header[‘basic:ecg:hr:0-5]
-
__init__
(data=None, init=None, size=None)[source]¶ Parameters: - data (array) – Load an array to build the header.
- init (OrderedDict) – Initialize the the data header with this values.
- size (str) – Define the size in bytes of the current header.
-
__length__
(header)[source]¶ Calculate the bytes length of the current header.
Parameters: header (dict) – Target header in dict format for calculate the size. Returns: Number of bytes used by the header. Return type: int
-
array
()[source]¶ Return the sorted byte array with the correct size.
If one element is defined as 2 bytes length, this must be splitted and completed (if necessary) with an empty byte.
Returns: Single array with data header values, linke in C, C++, C#. Return type: list
-
load
(data)[source]¶ Load the data into the current header values.
Parameters: data (array) – Load an array to build the header.
-
request
()[source]¶ Generate the final header.
Returns: The main data with start-flag, checksum and end-flag. Return type: list
-
-
class
pycollect.headers.
PhysiologicalData
(*args, **kwargs)[source]¶ Bases:
pycollect.headers.HeaderHandler
The data transmitted from monitor is writed in this header.
This header is the combination of Datex Header and the follow header, is used for store the requested subrecords.
Byte No Description 0-4 Time 5-274 basic subclass 275-544 ext1 subclass 545-814 ext2 subclass 815-1084 ext3 subclass 1085 Marker, contains the number of latest entered mark. 1086 contains control information for patient data management functions, used internally by the monitor. 1087-1088 - The last word of the subrecord, contains
- The physiological data record class.
- The current D-O Record Interface level.
- The subrecord type.