esi-batch-config

Batch data configuration

Dependencies

library version inmation core library

dkjson

5.3.0

yes

debug

5.3.0

yes

esi-datetime

1.0.0

yes

esi-string

1.0.0

yes

esi-tool

1.0.0

yes

esi-subtype

1.0.0

yes

Documentation

SET_DEBUG_LOG_VAR(rec)

Set Log Variable

this method seems to have little effect, but should be included for compatibility reasons

Parameters

rec

the record where to log data

Returns

nil

SET_DELAY(delay)

This function sets the processing delay.

Parameters

delay

processing delay in seconds (self.delay)

Returns

nil

Usage

batch_config:_SET_DELAY(60) -- 60 seconds

SETSTOPOPTIONS(options,script)

This sets the options to determine end of batch

Modifies: self

Parameters

options

the BatchEnd options(int)

script

the BatchEnd script (optional)

Returns

nil

SETTIMESTAMPOPTIONS(localtime,options,format,script)

Sets the options to convert timestamps

Modifies: self

Parameters

localtime

local time

options

converison options

format

format of the timestamp

script

conversion script

Returns

nil

SET_S88_DETAIL_LEVELS(mask)

Sets the options for the S88 level of detail

Modifies: self

Parameters

mask

bitmasked configuration according to flags.S88DetailLevel

Returns

s88procedures or s88unitprocedures or s88equipmentphases

SET_BPR_UPDATES(selection)

Set the updateOn configuration

Parameters

selection

selection of update on events according to flags.BatchMLProductionRecordEvents

Returns

true

SET_CUSTOM_ANALYTICS(batchEnd,operationEnd,phaseEnd,stepEnd,periodic)

Set the custom analytivs entry

Parameters

batchEnd

the batch end script

operationEnd

the operation end script

phaseEnd

the phase end script

stepEnd

the step end script

periodic

the script being called periodically

Returns

true

SET_S95_EQ_ASSIGNMENT(object,partial)

Sets the options for the S95 assignment

Parameters

object

the equipment object

partial

the partial flag

SET_UNIQUE_CRITERIA(batch_unique_criteria)

Sets the options for the S95 assignment

Parameters

batch_unique_criteria

the batch unique criteria

Returns

nil

SET_BATCH_CHARACTERISTICS(map)

Sets the mapping list for batch characteristics

Parameters

map

the mapping as a lua table

Returns

nil

SET_BATCH_EVENTS(map)

Sets the mapping list for batch events

Parameters

map

the mapping as a lua table

Returns

nil

Sets the mapping list for batch trends

Parameters

map

the mapping as a lua table

Returns

nil

CLEAR_OPERATION_CHARACTERISTICS()

Clear operation characteristics

replace the existing configTable for characteristics on operation level with an new empty one.

Returns

nil

ADD_OPERATION_CHARACTERISTICS(map,all,id,name)

Add an operation characteristic

Parameters

map

the map to add

all

operations flag

id

optional id of the operation

name

optional name of the operation

Returns

nil

ADD_OPERATION(opdata)

Add an operation

Parameters

opdata

configuration of the operation

Returns

nil

ADD_EQ_PHASE(opdata,phdata)

Add an equipment phase

Parameters

opdata

configuration of the operation to add to

phdata

configuration of the equipment phase to add

Returns

nil

ADD_EQ_STEP(opdata,phdata,stdata)

Add an equipment step

Parameters

opdata

configuration of the operation to add to

phdata

configuration of the equipment phase to add to

stdata

configuration of the equipment step to add

Returns

nil

LOOKUP_OPERATION_ID(name)

Look up the operation id for a name

Parameters

name

operation name for which the id shall be looked up

Returns

operation id or nil

LOOKUP_OPERATION_NAME(id)

Look up the operation name for an id

Parameters

id

operation id for which the name shall be looked up

Returns

operation name or nil

LOOKUP_EQ_PHASE_ID(opid,opname,name)

Look up the equipment phase id for a name

Parameters

opid

current operation id in which to look up

opname

current operation name in which to look up

name

equipment phase name for which the id shall be looked up

Returns

eq. phase id or nil

LOOKUP_EQ_PHASE_NAME(opid,opname,id)

Look up the equipment phase name for an id

Parameters

opid

current operation id in which to look up

opname

current operation name in which to look up

id

equipment phase id for which the name shall be looked up

Returns

eq. phase name or nil

LOOKUP_EQ_STEP_ID(opid,opname,phid,phname,name)

Look up the equipment step id for a name

Parameters

opid

current operation id in which to look up

opname

current operation name in which to look up

phid

current eq phase id in which to look up

phname

current eq phase name in which to look up

name

equipment step name for which the id shall be looked up

Returns

eq. step id or nil

LOOKUP_EQ_STEP_NAME(opid,opname,phid,phname,id)

Look up the equipment step name for an id

Parameters

opid

current operation id in which to look up

opname

current operation name in which to look up

phid

current eq phase id in which to look up

phname

current eq phase name in which to look up

id

step id for which the name shall be looked up

Returns

eq. step name or nil

NORMALIZE_OPERATION_DATA(opdata)

Normalize Operation Data

this adds operation id or operation name if they are configured but not given in the live data. Changes will be done to the opdata object directly

Parameters

opdata

operation data configuration

Returns

nil

NORMALIZE_EQ_PHASE_DATA(opdata,phdata)

Normalize Equipment Phase Data

this adds eq. phase id or eq. phase name if they are configured but not given in the live data. Changes will be done to the phdata object directly

Parameters

opdata

data of the operation abobe the eq. phase

phdata

data of the eq. phase to normalize

Returns

nil

NORMALIZE_EQ_STEP_DATA(opdata,phdata,stdata)

Normalize Equipment Phase Data

this adds eq. step id or eq. step name if they are configured but not given in the live data. Changes will be done to the stdata object directly

Parameters

opdata

data of the operation abobe the eq. phase

phdata

data of the eq. phase abobe the eq. step

stdata

data of the eq. step to normalize

Returns

nil

GET_OPERATION_INDEX(id,name)

SUPPORTS_RECIPE_PHASES()

Returns true when recipe phases are supported

Returns

returns true if s88recipe phases are supported

SUPPORTS_EQUIPMENT_PHASES()

Returns true when equipment phases are supported

Returns

returns true if s88 equipment phases are supported

SUPPORTS_EQUIPMENT_STEPS()

Returns true if equipment steps are supported

Returns

returns true if s88 equipment steps are supported

CLEAR_EQ_PHASE_CHARACTERISTICS()

Clear eq. phase charachteristics

clear all entries in the configuration table for eq. phases

Returns

nil

ADD_EQ_PHASE_CHARACTERISTICS(map,opAll,opId,opName,all,id,name)

Adds eq. phase characteristics

Parameters

map

characteristics configuration

opAll

flag if all operations are used

opId

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

all

flag if all eq. phases are configured

id

id of the dedicated eq. phase (unless all)

name

name of the dedicated eq. phase (unless all)

Returns

true

CLEAR_EQUIPMENT_FOR_EQ_PHASES()

Clear all equipments from eq. phases

Returns

nil

ADD_EQUIPMENT_FOR_EQ_PHASES(map)

Adds equipment for eq. phase

as well as the name or id of the phase. This can’t be used with all phases.

Parameters

map

which includes the equipment configuration and the name and id of the operation above,

Returns

nil

FIND_EQUIPMENT_FOR_EQ_PHASE(opIdInt,opName,epIdInt,epName)

Find equipment for a dedicated eq. phase

Parameters

opIdInt

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

epIdInt

id of the dedicated eq. phase

epName

name of the dedicated eq. phase

Returns

the first equipment entry found

CLEAR_EQ_STEP_CHARACTERISTICS()

Clear eq. step characteristics

clear all entries in the configuration table for eq. steps

Returns

nil

ADD_EQ_STEP_CHARACTERISTICS(map,opAll,opId,opName,epAll,epId,epName,all,id,name)

Adds eq. step characteristics

Parameters

map

characteristics configuration

opAll

flag if all operations are used

opId

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

epAll

flag if all eq. phases are used

epId

id of the eq. phase above (unless all eq. phases)

epName

name of the eq. phase above (unless all eq. phases)

all

flag if all eq. phases are configured

id

id of the dedicated eq. phase

name

name of the dedicated eq. phase

Returns

true

CLEAR_OPERATION_EVENTS()

Clear config table for the events of an operation

replace the configTable for events on operation level with a new and empty one

Returns

nil

ADD_OPERATION_EVENTS(map,all,id,name)

Adds operation events

Parameters

map

event configuration

all

flag if all operations are used

id

id of the operation above (unless all operations)

name

name of the operation above (unless all operations)

Returns

nil

GET_OPERATION_EVENTS(opId,opName)

Get operation events

Parameters

opId

id of the operation above

opName

name of the operation above

Returns

returns a list of event configurations

CLEAR_EQ_PHASE_EVENTS()

Clear config table for the events of an eq. phase

replace the configTable for events on eq phase level with a new and empty one

Returns

nil

ADD_EQ_PHASE_EVENTS(map,allOp,opId,opName,allPh,phId,phName)

Adds eq. phase events

Parameters

map

event configuration

opAll

flag if all operations are used

opId

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

allPh

flag if all eq. phases are used

phId

id of the eq. phase (unless all eq. phases)

phName

name of the eq. phase (unless all eq. phases)

Returns

nil

GET_EQ_PHASE_EVENTS(opId,opName,phId,phName)

Get eq. phase events

Parameters

opId

id of the operation above

opName

name of the operation above

phId

id of the eq. phase

phName

name of the eq. phase

Returns

returns a list of event configurations

CLEAR_EQ_STEP_EVENTS()

Clear config table for the events of eq. steps

replace the configTable for events on eq. step level with a new and empty one

Returns

nil

ADD_EQ_STEP_EVENTS(map,allOp,opId,opName,allPh,phid,phName,allSt,stId,stName)

Adds eq. step events

Parameters

map

event configuration

opAll

flag if all operations are used

opId

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

allPh

flag if all eq. phases are used

phId

id of the eq. phase above (unless all eq. phases)

phName

name of the eq. phase above (unless all eq. phases)

allSt

flag if all eq. phases are configured

stId

id of the dedicated eq. phase (unless all eq. steps)

stName

name of the dedicated eq. phase (unless all eq. steps)

Returns

nil

GET_EQ_STEP_EVENTS(opId,opName,phId,phName,stId,stName)

Get eq. step events

Parameters

opId

id of the operation above

opName

name of the operation above

phId

id of the eq. phase above

phName

name of the eq. phase above

stId

id of the dedicated eq. phase

stName

name of the dedicated eq. phase

Returns

returns a list of event configurations

Clear config table for the trends for operations

replace the configTable for trends on operation level with a new and empty one

Returns

nil

Adds operation trends

Parameters

map

charactrend configuration

all

flag if all operations are used

id

id of the operation (unless all operations)

name

name of the operation (unless all operations)

Returns

nil

Get operation trends

Parameters

opId

id of the operation above

opName

name of the operation above

Returns

returns a list of trend configurations

Clear config table for the trends for eq. phases

replace the configTable for trends on eq. phase level with a new and empty one

Returns

nil

Adds eq. phase trends

Parameters

map

charactrend configuration

opAll

flag if all operations are used

opId

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

allPh

flag if all eq. phases are used

phId

id of the eq. phase above (unless all eq. phases)

phName

name of the eq. phase above (unless all eq. phases)

Returns

nil

Get eq. phase trends

Parameters

opId

id of the operation above

opName

name of the operation above

phId

id of the eq. phase above

phName

name of the eq. phase above

Returns

returns a list of trend configurations

Clear config table for the trends for eq. steps

replace the configTable for trends on eq. step level with a new and empty one

Returns

nil

Adds eq. step trends

Parameters

map

charactrend configuration

opAll

flag if all operations are used

opId

id of the operation above (unless all operations)

opName

name of the operation above (unless all operations)

allPh

flag if all eq. phases are used

phId

id of the eq. phase above (unless all eq. phases)

phName

name of the eq. phase above (unless all eq. phases)

allSt

flag if all eq. phases are configured

stId

id of the dedicated eq. phase (unless all eq. steps)

stName

name of the dedicated eq. phase (unless all eq. steps)

Returns

nil

Get eq. step trends

Parameters

opId

id of the operation above

opName

name of the operation above

phId

id of the eq. phase above

phName

name of the eq. phase above

stId

id of the dedicated eq. phase

stName

name of the dedicated eq. phase

Returns

returns a list of trend configurations

COLLECT_OPERATION_CHARACTERISTICS(id,name)

Collects all characteristics for a given operation

Parameters

id

id of the operation

name

name of the operation

Returns

returns a map of characteristics

COLLECT_EQUIPMENT_PHASE_CHARACTERISTICS(opId,opName,id,name)

Collects all characteristics for a given eq. phase

Parameters

opId

id of the operation above

opName

name of the operation above

id

id of the eq. phase

name

name of the eq. phase

Returns

returns a map of characteristics

COLLECT_EQUIPMENT_STEP_CHARACTERISTICS(opId,opName,epId,epName,id,name)

Collects all characteristics for a given eq. step

Parameters

opId

id of the operation above

opName

name of the operation above

epId

id of the eq. phase above

epName

name of the eq. phase above

id

id of the dedicated eq. phase

name

name of the dedicated eq. phase

Returns

returns a map of characteristics

NEW(cfgversion,objpath,objtype)

New constructor

Parameters

cfgversion

config version of the object

objpath

path of the object

objtype

type of the object

Returns

obj, the new object of type "esi-batch-config"

CONVERT(data)

Convert an old version of the config object to the new versionr

Parameters

data

the config object to convert

Returns

a new configuration with JSON version 1.0

TO_JSON()

Convert an object to its JSON representation

Returns

a json version of the object (self)