nope/modules/mod-Beckhoff-PLC-Interface/helpers/create.client.ts
2020-12-01 13:03:37 +01:00

27 lines
575 B
TypeScript

/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
* @create date 2020-03-02 11:42:33
* @modify date 2020-12-01 13:01:55
* @desc [description]
*/
import * as ads from "node-ads";
import { generateOptions } from "./gen.options";
export function createClient(options: {
name: string;
host: string;
amsNetIdTarget: string;
amsNetIdSource: string;
twinCatVersion: 2 | 3;
port?: number;
amsPortSource?: number;
amsPortTarget?: number;
timeout?: number;
}) {
const _options = generateOptions(options);
const client = ads.connect(options);
}