shiolink-client
v1.0.2
Published
SHIOLINK client SHIORI
Downloads
4
Readme
shiolink-client.js
SHIOLINK client SHIORI
標準入出力からSHIOLINKプロトコルを受け渡すことでSHIORIと通信する
Install
npm install shiolink-client
Usage
import { spawn } from "child_process";
import { ShioriEncodeLayer } from "shiolink-client"; // for charset convert
import { Shiorif } from "shiorif";
async function main() {
const ps = spawn("shiolink_adapter.exe", ["ghost/master/shiori.dll"]);
ps.stdout.resume();
const shiorif = new Shiorif(new ShioriEncodeLayer(new ShiolinkClient(ps.stdout, ps.stdin)));
await shiorif.load("C:\\ukagaka\\ghost\\master\\");
await shiorif.getVersion2();
await shiorif.get3("OnBoot").then((tx) => console.log(tx.response.toString()));
await shiorif.unload();
}
main();
License
This is released under Zlib License.