Hayato Kikuchi
/
MonitoringTest
Communication Class and Controller Class (ControllerForMbed Class)
CommunicationMonitoring.h@2:fd0c21600586, 2021-12-23 (annotated)
- Committer:
- kikuchi8810
- Date:
- Thu Dec 23 08:56:26 2021 +0000
- Revision:
- 2:fd0c21600586
- Parent:
- 1:6633661058ec
modified
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kikuchi8810 | 0:a33375289d79 | 1 | #ifndef COMMUNICATIONMONITORING_H |
kikuchi8810 | 0:a33375289d79 | 2 | #define COMMUNICATIONMONITORING_H |
kikuchi8810 | 0:a33375289d79 | 3 | |
kikuchi8810 | 0:a33375289d79 | 4 | #include "mbed.h" |
kikuchi8810 | 0:a33375289d79 | 5 | |
kikuchi8810 | 0:a33375289d79 | 6 | struct Comminfo |
kikuchi8810 | 0:a33375289d79 | 7 | { |
kikuchi8810 | 0:a33375289d79 | 8 | int time_out_ms; |
kikuchi8810 | 0:a33375289d79 | 9 | int int_time_ms; |
kikuchi8810 | 0:a33375289d79 | 10 | bool Available; |
kikuchi8810 | 0:a33375289d79 | 11 | int count_ms; |
kikuchi8810 | 0:a33375289d79 | 12 | int pre_count_ms; |
kikuchi8810 | 0:a33375289d79 | 13 | }; |
kikuchi8810 | 0:a33375289d79 | 14 | |
kikuchi8810 | 0:a33375289d79 | 15 | |
kikuchi8810 | 0:a33375289d79 | 16 | class CommunicationMonitoring |
kikuchi8810 | 0:a33375289d79 | 17 | { |
kikuchi8810 | 0:a33375289d79 | 18 | public: |
kikuchi8810 | 0:a33375289d79 | 19 | CommunicationMonitoring(); |
kikuchi8810 | 0:a33375289d79 | 20 | |
kikuchi8810 | 0:a33375289d79 | 21 | int init(int _time_out_ms, int _int_time_ms); |
kikuchi8810 | 0:a33375289d79 | 22 | void Monitoring(bool commCheck, int _device_num); |
kikuchi8810 | 1:6633661058ec | 23 | bool isAvailable(int _device_num); |
kikuchi8810 | 1:6633661058ec | 24 | bool isAllAvailable(void); |
kikuchi8810 | 0:a33375289d79 | 25 | |
kikuchi8810 | 0:a33375289d79 | 26 | private: |
kikuchi8810 | 0:a33375289d79 | 27 | |
kikuchi8810 | 0:a33375289d79 | 28 | Comminfo comminfo[10]; |
kikuchi8810 | 0:a33375289d79 | 29 | int device_num; |
kikuchi8810 | 0:a33375289d79 | 30 | |
kikuchi8810 | 0:a33375289d79 | 31 | }; |
kikuchi8810 | 0:a33375289d79 | 32 | |
kikuchi8810 | 0:a33375289d79 | 33 | #endif |
kikuchi8810 | 0:a33375289d79 | 34 |