Test if the user is trying to write to a bit of a word
ex. Tag.1 returns true (Tag = DINT)
Parameters
tag: string
Returns boolean
_replacePin
_replacePin(str?: string, pin: string): string
description
replace pin mapping
Parameters
Default value str: string = ""
pin: string
Returns string
Const flatten
flatten(arr: Array<any>): any
flatten array
Parameters
arr: Array<any>
Returns any
getBitOfWord
getBitOfWord(tag: string, value: number): undefined | number
description
Takes a tag name, gets the bit from the end of it, then returns that bits value
Parameters
tag: string
value: number
Returns undefined | number
getDevice
getDevice(deviceType: string | number): string
Parameters
deviceType: string | number
Returns string
getErrorCode
getErrorCode(status: number): any
Parameters
status: number
Returns any
getVendor
getVendor(vendorId: string | number): string
Parameters
vendorId: string | number
Returns string
getWordCount
getWordCount(start: number, length: number, bits: number): number
description
Get the number of words that the requested
bits would occupy. We have to take into account
how many bits are in a word and the fact that the
number of requested bits can span multipe words
Parameters
start: number
length: number
bits: number
Returns number
nameFunction
nameFunction(name: string, body: function): function
Returns the specific bit of a words value