Skip to content

Commit 079c716

Browse files
committed
explain decode done #5 on getDcpMessages output.
1 parent cfb2bd3 commit 079c716

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

opendcs-acquisition/INSTALL.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,29 @@ eventually it gets posted:
208208

209209
## Data Encoding
210210

211-
* based on python string method: .decode('unicode-escape') expands all the \077 octal characters to ASCII equivalents.
212-
* replace \r and \n with line-feed and carriage-return respectively.
213-
* trip trailing spaces on each line.
214-
* ignore \f (formfeed) and \t (tab) and any other escape codes.
215-
* not sure what happens with \\ I think nothing.
211+
input data for dcpflow callback is the initial output from getDcpMessage -e -x (escape and unix new-lines settings.)
216212

213+
* each observation is prepended with a header determined from ahlpdt directives.
214+
215+
* the first 8 characters give the Pdt which is looked up in ahldt to get TTAAii_CCCC
216+
* the date part of the AHL comes from characters 9-18.
217+
218+
* bulletins have \r\n line endings in general (WMO bulletin style, as oppposed to \n used on MSC bulletins.)
219+
220+
* if the 38'th character on the line is a space, then assume plain-text:
221+
222+
* based on python string method: .decode('unicode-escape') expands all the \077 octal characters to ASCII equivalents.
223+
* replace \r and \n with line-feed and carriage-return respectively.
224+
* trim trailing spaces on each line.
225+
* ignore \f (formfeed) and \t (tab) and any other escape codes.
226+
* not sure what happens with \\ I think nothing.
227+
228+
else:
229+
230+
* no change to getDcpMessage output. (treated as binary.)
231+
232+
feedback from processing would be needed to understand whether this decode is easily
233+
understood by downstream consumers.
217234

218235
## Maintenance Activities
219236

0 commit comments

Comments
 (0)