vdv-451-reader
v0.1.0
Published
A streaming VDV 451 reader.
Downloads
3
Maintainers
Readme
vdv-451-reader
A streaming VDV 451 reader.
Installing
npm install vdv-451-reader
Usage
const createReader = require('vdv-451-reader')
const reader = createReader()
reader.on('data', console.log)
reader.on('error', console.error)
reader.end(`\
mod; YYYY/MM/DD; HH:MM:SS; aligned
src; "LIO-ADAPTER-VDV 4.0"; "1998/06/18"; "14:05:48"
chs; "ISO-8859-1"
fft; "LIObus"
tbl; MENGE_ONR_TYP
atr; BASIS_VERSION; ONR_TYP_NR; STR_ONR_TYP; ONR_TYP_TEXT
frm; num[11.0]; num[11.0]; char[8]; char[32]
rec; 1; 1; "HP"; "Haltepunkt"
rec; 1; 2; "BHOF"; "Betriebshofpunkt"
end; 4
eof; 1`)
{
BASIS_VERSION: 1,
ONR_TYP_NR: 1,
STR_ONR_TYP: 'HP',
ONR_TYP_TEXT: 'Haltepunkt'
}
{
BASIS_VERSION: 1,
ONR_TYP_NR: 2,
STR_ONR_TYP: 'BHOF',
ONR_TYP_TEXT: 'Betriebshofpunkt'
}
API
createReader()
createReader
returns a readable stream in object mode.
Contributing
If you have a question or have difficulties using vdv-451-reader
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.