Configure rascal

We assume you have already done the basic setup using rascal setup as lined out in https://gitlab.com/codecivil/rascal/-/tree/master. Navigate to the web console and configure the following (in recommended order). Editable items are marked by a pen icon, removable items are marked by an "x" symbol and the corresponding action is executed by clicking on the icon.

Configuration

Edit the new entry and specify the settings, in particular

  • card writer: key

    This is keyA of block 1 of the Mifare cards to be used; it can be any ascii string of six characters.

  • card writer: card poll period

    Reaction time after inserting a smart card

  • card user: grace period

    Period (in seconds) after inserting the card for cancelling the operation by reinsert. This may be a few seconds for personal use or a few minutes for office use.

  • front end: admin password

    Click in the empty space right of the item to change the current password. It is saved only hashed and will not be displayed.

  • front end: instance name

    Name to recognise the instance by in the admin panel

  • front end: wait before save (ms)

    Changes in the web console are automatically saved but only after the configured period in milliseconds; this avoids heavy load on the rascal database during typing. The default value is 1300ms.

Connections

Adapt the mysql connection details to your needs and give it a name. If the mysql server is remote you might have to configure the mysql server to allow remote connections.

Classes

A class is defined by a connection name and a JSON string of a list of remote fields, e.g. ["id","begintime"]; and is given a class name. The name of the remote fields are simply variable names for use in the action configuration and thus do not have to coincide with the real column name of your (remote) database; but it might be a good idea to do so.

Actions

An action is uniquely given by its class name and binary parity. Think of parity 1 as "begin a process" and parity 0 as "end a process".

  • user defined

    JSON string of an object consisting of field/variable names as keys and a description as value, e.g. {"description": "Short description of your task"}. On card insert matching class and parity a graphical window asks for input for the given keys using the descriptive values as labels. This allows for mysql inserts individual to each card use. The fixed values are specified in the class definition. If you run rascal headless, however, you should leave this field empty.

  • SQL query

    The sql query to be executed after card insert with placeholders for the values of the variable names defined in the class and action. The placeholders are the variablenames enclosed by $ signs, e.g. $description$.

Cards

A card is given by its class memberships and values of the remote fields defined in those classes; and of course it is assigned a card name. The card name is used as title of the graphical popup windows if there are user defined values in the card's actions. The values of the remote fields are again given by JSON strings of the variable names as keys and their values as values, e.g. {"id":12}.