Concepts of VTQLserver
Up: Documentation content
Previous: Using the Clients
Next: VTQL syntax
The main idea is to create an interface to videotext so that different
applications may access it. This is done with an server-client concept, where
the server collects the pages and stores them in memory.
A client connects to a socket provided by the server. It sends VTQL commands to
interact with the server and to access the pages database. All configuration of
the server is also done within VTQL and may be changed at runtime without data
loss.
Connection Modes
The server can provide different sockets for different modes of access. A
socket is represented by a file and users with write access to the file may
connect open a connection to the server. There are four modes of access:
In mode Nobody any connection will be closed immediately after showing
some version info. In Event mode you get an output on every page the
server has recieved, decoded and puted into the pages database; you may control
the output by the event subset of VTQL commands. The Insert mode is
for inserting pages by hand in the format PAGE
...HEX
outputs. On any error the connection will be closed.
The query subset of VTQL commands is available at the modes Query and
Config. In these modes, you get a response to any input line, where
the last line is "VOID
",
"SUCCESS
" or "ERROR
". In mode
Config you may also use the configuraion subset of VTQL.
mode | idea | command subset
|
---|
Nobody | no access at all | none
|
Event | output every page if it gets stored to the database
| event
|
Query | allow any kind of query
| query
|
Config | change the configuration of the server
| query and configuration
|
Locking of Config Mode
It may be hard to configure the server, if you do not know whether some other
connection does configuration in parallel. So you may lock your connection to
disable the configuration subset of VTQL to any other connection. If you close
your connection it will be unlocked automatically.
Stations
An important point of VTQLserver is, to store the pages per station:
Pages are sent repeatedly, but you are only want to keep the latest version of
a page. So, any page that matches the station match will be inserted
into the the according station, replacing older pages with the same page and
subpage number.
Page Timeout
Stations tend to reorganize their pages several times a day. So it may happen
that the server holds pages, that belong to an older layout. This pages can be
removed automtically by setting a page timeout for a station: A page
gets removed from the pages database, if more then the specified number of
pages has been recieved at this station.
Access to Video Device
In principle there is no need for an access to a video device and indeed, VTQserver works fine without it. There are three points, why it is usefull to let VTQLserver have access to it nevertheless:
- If you did not call an external application, usually your TV card will not
be initialized. No station is tuned in and you do not get any videotext pages.
Also, on most cards there are different channels and only one of these channels
is a TV tuner (an other may be e.g. the video input). If the server has access
to the video device, it will initialize the TV card on the first call of either
FREQ
... ZAP
or DEVICE VIDEO OPEN
.
- To destinguish the different stations, the most easy way is to check the
frequency at the time, the page has been received. The frequency can be fetched
without using the video device on the 2.4 kernels, but it seems not to work
with the older kernels. So if a call of
FREQ
... ZAP
tells you that the frequency is unknown, you have to open the video device
permanently to fetch the frequency information. If you want to let autozapping
work, it is neccessary to have a frequency information.
- If you have different frquencies, where you receive videotext, you may let
the server switch this frequencies. You can control this behaviour with the
autozap table, which sets the priority of a frequency: The server
tries (if available) to switch to next station if the specified number of
pages have been received.