Project

General

Profile

DataQuerySource Extender

> Starting from v 2.15.102.247 and 2.16.0.13

Function


This extender allows receiving broadcasting schedule contents or contents of MDB items from an external source. It is possible to receive contents in XML format via command line utility DataQuerySourceClient.exe or via System of Events. A configured System of Events is needed for correct operation of the extender, allowing external access to the application. Configuring System of Events in DIGISPOT II applications. The exchange protocol must be specified as XML (PROTOCOL="XML").
Source of data for XML creation (can be broadcasting DJin or Editor):

<EVENT_SERVER HOST="SERVER">
  <CLIENTS>
    <TCP ADDR="SERVER_XML" TYPE="SERVER" IP="0.0.0.0" PORT="7777" PROTOCOL="XML"/>
  </CLIENTS>                                             
</EVENT_SERVER>

Receiver of data for XML creation (workstation with DataQuerySource.dll):

<EVENT_SERVER HOST="CLIENT">
  <CLIENTS>
    <TCP TYPE="CLIENT" IP="127.0.0.1" PORT="7777" PROTOCOL="XML"/>
  </CLIENTS>                                             
</EVENT_SERVER>

Configuration


The plug-in library file DataQuerySource.dll must be placed in the Extenders folder of a DJin that provides access to necessary schedule and / or database. The plug-in ID will then be fixed as: DataQuerySource

DataQuerySourceClient Utility


The utility allows accessing DataQuerySource and receiving results as XML. The utility must be on the work place where you plan to receive data in XML format.
The parameters of the request are sent via command line and the results are returned to standard output stream as XML.
The utility’s running parameters will be displayed if the former is run with no parameters.

Parameters: <Module name> <Address> <Command> [Arguments]
  Module name  - module name of the data query plugin
  Address      - address connection to server ([ip address]:[port])
  Command      - command name
  Arguments    - arguments to command (<Value name>,<Type>=<value>|"<value>"[ ]...

Known commands:
* GET_MDB_ITEM_INFO     - gets MDB item with specified id
   id - Db id of MDB item, Int32, ex: 1234

* GET_SCHEDULE_CONTENT  - gets scheule content
   sch_folder_name          - name of schedule, as in Global settings, string
   sch_folder_path          - path to schedule, as in Global settings, string
   date                     - schedule date, string, yyyy-mm-dd

In versions newer than 2.16.76 and 2.17.0.121, two new parameters are added - /u and /timeout

Optional switches:
  /u           - turn output encoding to UTF-8, to avoid output character conversion, 
  /timeout=xxx - set reply timeout, where xxx is integer timeout value, seconds (socket will closed)

In examples shown below, DataQuerySourceClient.exe accesses DataQuerySource, which is part of a locally running application (because it accesses via the address 127.0.0.1) that uses port 7777 to exchange events in XML format.
Here is an example of received information about an MDB item with ID = 1.

DataQuerySourceClient.exe DataQuerySource 127.0.0.1:7777 GET_MDB_ITEM_INFO id,Int32=1

Here is an example of received Default schedule for January 30, 2013.

DataQuerySourceClient.exe DataQuerySource 127.0.0.1:7777 GET_SCHEDULE_CONTENT sch_folder_name=Default date=2013-01-30

Add picture from clipboard (Maximum size: 742 MB)