nope/modules/mod-Beckhoff-PLC-Interface/helpers/create.client.ts

27 lines
575 B
TypeScript
Raw Normal View History

2020-08-30 07:45:44 +00:00
/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
* @create date 2020-03-02 11:42:33
* @modify date 2020-03-02 11:42:33
* @desc [description]
*/
import { generateOptions } from "./gen.options";
import * as ads from "node-ads";
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);
}