Live machine state prompt
The current state of the machines can be queried with the UDF skrpps_02.skr_get_mc_states(…). The data returned by this UDF is not available as DB table put will be made available directly by the PollClient.
- Switch between PollClient.exe and Postgres DB with the help of "Shared Memory"
- If the PollClient service was not started, an empty table will always be returned.
Parameter |
Type |
Description |
---|---|---|
_aMcIds |
integer [] |
SKR machine IDs of the machines whose state is to be queried.
Note: |
Wrong: First of all a table with the status information of all machines is generated, then all entries but one are rejected. | ||
Correct: Only the entry of the machine with the |
Column |
Type |
Contents |
---|---|---|
MC_KEY |
integer |
SKR machine ID |
ACTIVATED |
boolean |
True if the machine is active (not inoperative) in the SKR |
CONNECTED |
boolean |
True if the PollClient has established a TCP/IP connection to the machine |
DATA_UP_TO_DATE |
boolean |
True if it is highly probable that the content of the data for this machine is the current one. Uncertainty due to: |
LAST_EVENT_TIMESTAMP |
timestamp without time zone |
Timestamp of the most recent event transferred to the SKR |
USER_STATE |
smallint |
Current state of User State Event |
SINTRAL_STATE |
smallint |
Current state of Sintral State Event |
SHIFT_STATE |
smallint |
Current shift |
MC_STATE |
smallint |
Current Machine State |
MC_STATE_PARAM |
text |
Parameter of the last machine status change events |
PATTERN_NAME |
text |
Currently loaded pattern |
SEQ_NAME |
text |
Currently loaded sequence |
TICKET_UID |
bigint |
PPS UID of the currently loaded ticket |
TICKET_TYPE |
smallint |
Ticket type |
TICKET_CUSTOMER_ID |
text |
Ticket customer ID |
TICKET_ARTICLE_ID |
text |
Ticket Article ID |
TICKET_PRODUCTION_ID |
text |
Ticket production ID |
TICKET_PRODUCTION_SUB1_ID |
text |
Ticket production sub ID 1 |
TICKET_PRODUCTION_SUB2_ID |
text |
Ticket production sub ID 2 |
PRODUCTIVITY_FLAGS |
smallint |
Productivity flags
|
PRODUCTIVITY_SPEED |
smallint |
Machine speed with active snail key in % |
USER |
text |
Last user signed in to the machine |
[SKR_ERR_ID] |
smallint |
Debug info: Internal SKR error state |
[CONNECT_STATE] |
smallint |
Debug info: Internal SKR net state |
[ROW_UPDATES] |
smallint |
Debug info: Internal SKR update counter for this line |
Code example skr_get_mc_states
- List all machines:
-
SELECT * from skrpps_02.skr_get_mc_states( NULL);
Or also (with machine name in cleartext): - SELECT skrpps_02.skr_mcid2mcname( "MC_KEY",'skr'::cstring),* from skrpps_02.skr_get_mc_states( NULL);
- Only the machines with the MC_IDs 1404903009 and 1404903002:
-
SELECT skrpps_02.skr_mcid2mcname( "MC_KEY",'skr'::cstring),
* from skrpps_02.skr_get_mc_states( ARRAY[1404903009,1404903002]);