Esempio n. 1
0
def get_cards(terminal: Terminal):
    command = Functions.make_command(Constants.GET_CARDS_COMMAND,
                                     terminal.terminal_id)
    terminal.communicate_with_server(command)
Esempio n. 2
0
def get_terminals(terminal: Terminal):
    command = Functions.make_command(Constants.GET_TERMINALS_COMMAND,
                                     terminal.terminal_id)
    terminal.communicate_with_server(command)
Esempio n. 3
0
def delete_worker(terminal: Terminal, worker_id):
    command = Functions.make_command(Constants.DELETE_WORKER_COMMAND,
                                     terminal.terminal_id, [worker_id])
    terminal.communicate_with_server(command)
Esempio n. 4
0
def get_workers(terminal: Terminal):
    command = Functions.make_command(Constants.GET_WORKERS_COMMAND,
                                     terminal.terminal_id)
    terminal.communicate_with_server(command)
Esempio n. 5
0
def delete_terminal(terminal: Terminal, terminal_id):
    command = Functions.make_command(Constants.DELETE_TERMINAL_COMMAND,
                                     terminal.terminal_id, [terminal_id])
    terminal.communicate_with_server(command)
Esempio n. 6
0
def delete_card(terminal: Terminal, card_rfid):
    command = Functions.make_command(Constants.DELETE_CARD_COMMAND,
                                     terminal.terminal_id, [card_rfid])
    terminal.communicate_with_server(command)
Esempio n. 7
0
def unassign(terminal: Terminal, card_rfid):
    command = Functions.make_command(Constants.UNASSIGN_COMMAND,
                                     terminal.terminal_id, [card_rfid])
    terminal.communicate_with_server(command)
Esempio n. 8
0
def add_worker(terminal: Terminal, worker_id, surname, name):
    command = Functions.make_command(Constants.ADD_WORKER_COMMAND,
                                     terminal.terminal_id,
                                     [worker_id, surname, name])
    terminal.communicate_with_server(command)
Esempio n. 9
0
def shutdown(terminal: Terminal):
    command = Functions.make_command(Constants.SHUTDOWN_COMMAND,
                                     terminal.terminal_id)
    terminal.communicate_with_server(command)