Skip to content

Commit

Permalink
#3 Removed obsolete obsever-section
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegue committed Apr 24, 2024
1 parent 3e76ab1 commit cd47b1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 56 deletions.
38 changes: 9 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,12 @@ A typical device is built like this:
"type": "io",
"device_io": {
...
},
"observers": [
...
]
}
}
}
```

* The ``DeviceName`` is up to you but must be unique and is important for the ``observers``-section
* The ``DeviceName`` is up to you but must be unique
* The ``type`` specifies the type of data the devices receive (currently only ``NMEADevice`` and ``SeatalkDevice`` is supported)
* Optional settings:
* ``auto_flush: x``: Flushes IO every time every ``x`` datagrams were received.
Expand Down Expand Up @@ -150,9 +147,7 @@ So, it only transmits/receives NMEA-Strings.
"type": "TCPServer",
"port": 9900,
"encoding": "ASCII"
},
"observers": [
]
}
}
}
```
Expand All @@ -170,9 +165,7 @@ This example creates a client which will try to connect to ``172.24.1.1:9901``.
"port": 9901,
"ip": "172.24.1.1",
"encoding": "ASCII"
},
"observers": [
]
}
}
}
```
Expand All @@ -191,9 +184,7 @@ Assumes **appending**-mode!
"type": "File",
"path": "/tmp/my_nmea_file.txt",
"encoding": "ASCII"
},
"observers": [
]
}
}
}
```
Expand Down Expand Up @@ -223,11 +214,7 @@ Following example is a `Serial` device listening on ``/dev/ttyUSB0`` with ASCII-
"type": "Serial",
"port": "/dev/ttyUSB1",
"encoding": "ASCII"
},
"observers": [
"TCP",
"TimeSetter"
]
}
}
}
```
Expand Down Expand Up @@ -258,10 +245,7 @@ Furthermore, the IO gets flushed after 10 datagrams were received (set with opti
"device_io": {
"type": "SeatalkSerial",
"port": "/dev/ttyUSB3"
},
"observers": [
"MyTCPServer"
]
}
}
}
```
Expand All @@ -278,9 +262,7 @@ This device just prints out to StdOut (StdIn currently not supported):
"device_io": {
"type": "StdOutPrinter",
"encoding": "UTF-8"
},
"observers": [
]
}
}
}
```
Expand All @@ -304,9 +286,7 @@ Besides positional data there are also some timing information. If you add a ``S
"type": "SetTimeDevice",
"device_io": {
"type": "IO"
},
"observers": [
]
}
}
}
```
Expand Down
34 changes: 7 additions & 27 deletions devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"type": "Serial",
"port": "/dev/ttyUSB0",
"encoding": "UTF-8"
},
"observers": [
"TCP"
]
}
},
"AIS": {
"type": "NMEADevice",
Expand All @@ -17,10 +14,7 @@
"port": "/dev/ttyS5",
"baudrate": 38400,
"encoding": "UTF-8"
},
"observers": [
"TCP"
]
}
},
"GPS": {
"type": "NMEADevice",
Expand All @@ -29,50 +23,36 @@
"type": "Serial",
"port": "/dev/ttyUSB1",
"encoding": "ASCII"
},
"observers": [
"TCP",
"TimeSetter"
]
}
},
"Wind": {
"type": "NMEADevice",
"device_io": {
"type": "Serial",
"port": "/dev/ttyUSB2",
"encoding": "ASCII"
},
"observers": [
"TCP"
]
}
},
"Seatalk": {
"type": "SeatalkDevice",
"device_io": {
"type": "SeatalkSerial",
"port": "/dev/ttyUSB3",
"encoding": false
},
"observers": [
"TCP"
]
}
},
"TCP": {
"type": "NMEADevice",
"device_io": {
"type": "TCPServer",
"port": "9900",
"encoding": "UTF-8"
},
"observers": [
]
}
},
"TimeSetter": {
"type": "SetTimeDevice",
"device_io": {
"type": "IO"
},
"observers": [
]
}
}
}

0 comments on commit cd47b1a

Please sign in to comment.