File

src/api/model/channel/programProperties.ts

Description

Class that groups all properties related to program execution.

Extends

Base

Index

Properties
Methods

Properties

Public activecycle
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

activecycle. The running cycle within the execution

Public blkn
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

blkn. Last block executed.

Public cytime
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

cytime. Part-program execution time (in hundredths of a second).

Public cytimeEnd
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

cytimeEnd. Part-program execution time (in hundredths of a second). ???????????

Public partc
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

partc. Parts counter

Public partn
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

partn. Parts total

Public pathselect
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

pathselect. The filesystem path of the program selected to be executed.

Public prg_offset
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

prg_offset. Execution line of the program.

Public progexec
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

progexec. The name of the program in execution.

Public progselect
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

progselect. The program selected to be executed.

Public singleblock
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

sbout. True if single block function activated.

Public softlimit
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

softlimit. Limit Soft Warning

Methods

createListener
createListener(props: Array)

This method will return a custom listener object designed for listening to changes on some concrete properties. Pooling can be avoived, so it can represent a significant better performance.

const listener1 = cnc.getChannel(1).programProperties.createListener(['progselect', 'pathselect']);
listener1.start((progProperties, props) => {
console.log(`"t" or "d" (or both) have changed: ${props.join(',')} (within the last 500 ms)`)})
}, { debounceTime: 500 });
Parameters :
Name Type Optional Description
props Array<string> No

Array containing string with current objects propeties (@Listenables) names

Returns : Listener
deleteListener
deleteListener(props: Array)

This method will remove the properties listener from current propgram properties Entity. The properties listener has certain cost and must be un-plugged when is no longer needed.

// Considering previous example
const listener1 = cnc.getChannel(1).programProperties.createListener(['progselect', 'pathselect']);
listener1.start((progProperties, props) => {
console.log(`"t" or "d" (or both) have changed: ${props.join(',')} (within the last 500 ms)`)})
}, { debounceTime: 500 });

cnc.getChannel(1).programProperties.deleteListener(listener1);
// After calling deleteListener "listener1"  will be null, ready for garbage collector.
Parameters :
Name Type Optional Description
props Array<string> No

Array containing string with current objects propeties (@Listenable()) names

Returns : void

results matching ""

    No results matching ""