0.3.5 • Published 4 years ago

react-native-proto-serial v0.3.5

Weekly downloads
15
License
MIT
Repository
github
Last release
4 years ago

react-native-proto-serial

USB to UART embedded device communitcation library

Installation

npm install react-native-proto-serial

Usage

const device = new SerialDevice();
const deviceService = new DeviceService(
    device,
    new ProtoSerializer<MessageBase>(MessageBase.decode, MessageBase.encode)
);

deviceService.request$<IAboutResponse>(
                MessageBase.create({
                    aboutRequest: {}
                }),
                (x) => x.aboutResponse
            )
            .subscribe((response) => console.log('response: ', response));

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT