You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HINTS.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This page describes implementation details.
7
7
- Starting point is using a _Device_ object matching attached hardware: _DeviceP24_ or _DeviceI24_
8
8
- If you have multiple devices, create multiple _Device_ instances
9
9
- With _capabilities_ it is possible to query for available layer
10
-
- To create a _Device_ object a _Connection_ object is required, use _SerialConnection_ to connect to a serial port
10
+
- To create a _Device_ object, a _Connection_ object is required, use _SerialConnection_ to connect to a serial port
11
11
-_Connection_ must be opened and closed
12
12
- Call _device.initialize()_ to get a defined state of the device (it stops any active stimulation/measurement)
13
13
-_Device_ object has layers to access commands
@@ -18,8 +18,16 @@ This page describes implementation details.
18
18
- Do not mix usage of layers because device has a single internal state, e.g. calling low level _init()_ and afterwards mid level _update()_ will not work
19
19
20
20
## Device communication
21
+
- Each device has an instance of a _PacketBuffer_
22
+
- Should be used to read packets from connection
23
+
- Handles extraction of packets from byte stream
21
24
- Most functions communicating with the device are async functions, because they wait for a matching acknowledge and return values from acknowledge
22
25
- If no matching acknowledge or no acknowledge arrives in time, an exception is raised
26
+
- The async functions connection buffer handling is always identical:
27
+
- Clear buffer
28
+
- Send command
29
+
- Process incoming data until the expected acknowledge arrives
30
+
- More data remains in connection buffer
23
31
- Additionally functions with naming schema _send_xxx_ are normal functions not waiting for acknowledge
24
32
- The acknowledge needs to handled manually by using _PacketBuffer_ object from device
25
33
-_PacketBuffer_ reads data from connection and separates packets from data stream
@@ -28,7 +36,9 @@ This page describes implementation details.
28
36
- Library creates a custom logger, see class _Logger_
29
37
- By default some information is logged to console
30
38
- Set log level to DEBUG to get more detailed information
31
-
- For more performance, disable logger
39
+
-`logger().setLevel(logging.DEBUG)`
40
+
- For better performance, disable logger
41
+
-`logger().disabled = True`
32
42
33
43
## General layer
34
44
- Contains functions to get common information like device serial or firmware version
@@ -63,19 +73,26 @@ This page describes implementation details.
63
73
- Device sends now _DlSendLiveData_ packets with measurement data
64
74
- Call _stop()_ to end measurement
65
75
- Call _power_module()_ to power off measurement module
66
-
-Important: all storage related functions are untested
76
+
-IMPORTANT: all storage related functions are untested
67
77
68
78
# Deviation from Instruction for Use
69
79
70
80
## Dyscom commands
71
81
72
82
### Common
73
-
- Strings are 1 byte less long (null termination is not an extra byte) in acknowledge packets
74
83
- Datetime parameters have a different order
75
84
76
85
### DL_init
77
86
- Init state seems always be UNUSED
87
+
- Strings are 1 byte longer than in other commands
78
88
- Output data rate depends on init params filter property
89
+
- Setting a filter overwrite other settings
90
+
- ADS129x register channel 1-4 settings
91
+
- ADS129x config register output data rate
92
+
- Maybe more register values are changed
93
+
94
+
### DL_get for type file system status and list of measurement info
95
+
- Return never meaningful values, probably not implemented on I24 side
79
96
80
97
### DL_get_ack for type file by name
81
98
- Additional parameter mode (1 byte)
@@ -98,5 +115,6 @@ This page describes implementation details.
98
115
- Block number, 4 byte, block number of DL_send_file
99
116
100
117
### DL_send_live_data
101
-
- Parameters are big endian?
102
-
- SignalType for each sample is always 0
118
+
- SignalType for each sample is always 0
119
+
- Contains always 5 samples, regardless of selected signal types in DL_init
0 commit comments