11.07.2015 Views

RTCU Gateway 2 Plug-in Developers Kit User's Manual - Logic IO

RTCU Gateway 2 Plug-in Developers Kit User's Manual - Logic IO

RTCU Gateway 2 Plug-in Developers Kit User's Manual - Logic IO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>RTCU</strong> <strong>Gateway</strong> 2 <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> <strong>Kit</strong>, Version 1.00IntroductionThis document discusses the <strong>RTCU</strong> <strong>Gateway</strong> <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> kit, which enables you to developplug-<strong>in</strong>'s to the <strong>RTCU</strong> <strong>Gateway</strong> 2 (gateway).A plug-<strong>in</strong> is a third-party software components that extends the gateway with new functionality.It makes it possible to control which nodes are allowed to establish connection with the gateway.Connect and disconnect events can be received. The name of the nodes can be set, provid<strong>in</strong>g a betteroverview of the nodes.An example of this is the blacklist standard plug-<strong>in</strong> <strong>in</strong>cluded with the gateway, which lets youcontrol which clients are allowed to log-on to the gateway.Page 3 of 17<strong>Logic</strong> <strong>IO</strong> Aps Ph: (+45) 7625 0210Holmboes Allé 14 Fax: (+45) 7625 02118700 Horsens Email: <strong>in</strong>fo@logicio.comDenmarkwww.logicio.com


<strong>RTCU</strong> <strong>Gateway</strong> 2 <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> <strong>Kit</strong>, Version 1.00Contents of packageThe package this document is part of, conta<strong>in</strong>s the follow<strong>in</strong>g:• <strong>RTCU</strong> <strong>Gateway</strong> 2 <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> <strong>Kit</strong>.pdf This document• \<strong>Plug</strong>-<strong>in</strong>s\ Example plug-<strong>in</strong>s.In order to develop plug-<strong>in</strong>s, you will need to use Microsoft Visual Studio C++ 2005 or newer.The examples require Microsoft Visual Studio C++ 2010 or newer.Page 4 of 17<strong>Logic</strong> <strong>IO</strong> Aps Ph: (+45) 7625 0210Holmboes Allé 14 Fax: (+45) 7625 02118700 Horsens Email: <strong>in</strong>fo@logicio.comDenmarkwww.logicio.com


<strong>RTCU</strong> <strong>Gateway</strong> 2 <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> <strong>Kit</strong>, Version 1.00<strong>Plug</strong>-<strong>in</strong> <strong>in</strong>terfaceThe plug-<strong>in</strong> <strong>in</strong>terface can be described as the gateway provid<strong>in</strong>g services which the plug-<strong>in</strong> can use,<strong>in</strong>clud<strong>in</strong>g a way for plug-<strong>in</strong>s to register themselves with the gateway and a protocol for the exchangeof data with plug-<strong>in</strong>s. <strong>Plug</strong>-<strong>in</strong>s depend on the services provided by the host application and do notusually work by themselves.The <strong>in</strong>terface consists of several functions that allows a plug-<strong>in</strong> to register, de-register and subscribeto several so called services. It also offers so call Invoke service that currently <strong>in</strong>clude one functionto write to the gateway logg<strong>in</strong>g system. A service denotes a specific event that the gateway cannotify the plug-<strong>in</strong> on.In addition the plug-<strong>in</strong> may register properties that are user configurable parameters that can beedited <strong>in</strong> the <strong>RTCU</strong> <strong>Gateway</strong> 2 control panel and used by the plug-<strong>in</strong>.The architecture of the plug-<strong>in</strong> <strong>in</strong>terface is shown graphical below:The function call<strong>in</strong>g convention used is standard __cdecl.Page 5 of 17<strong>Logic</strong> <strong>IO</strong> Aps Ph: (+45) 7625 0210Holmboes Allé 14 Fax: (+45) 7625 02118700 Horsens Email: <strong>in</strong>fo@logicio.comDenmarkwww.logicio.com


<strong>RTCU</strong> <strong>Gateway</strong> 2 <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> <strong>Kit</strong>, Version 1.00Registration parameter structureSynopsistypedef struct gwpf_service_namelist_params {gwpf_func_nameitem first;gwpf_func_nameitem next;} gwpf_service_namelist_params;DescriptionInputfirstnextThis structure holds the parameters for subscrib<strong>in</strong>g to the name lookup event.Callback function that is called to get the first NodeID and Name pair.Callback function that is called to get the rema<strong>in</strong><strong>in</strong>g NodeID and Name pairs.Page 16 of 17<strong>Logic</strong> <strong>IO</strong> Aps Ph: (+45) 7625 0210Holmboes Allé 14 Fax: (+45) 7625 02118700 Horsens Email: <strong>in</strong>fo@logicio.comDenmarkwww.logicio.com


<strong>RTCU</strong> <strong>Gateway</strong> 2 <strong>Plug</strong>-<strong>in</strong> <strong>Developers</strong> <strong>Kit</strong>, Version 1.00Available RequestsSimilar to subscriptions, except the structures must be given to <strong>in</strong>voke, to perform an action on thegateway.Write to logService ID GWPF_SERVICE_LOG = 2This request makes it possible to write messages to the gateway log.Command parameter structureSynopsistypedef struct gwpf_service_log_params {<strong>in</strong>ttype;const char*message;} gwpf_service_log_params;DescriptionThis structure holds the parameters for <strong>in</strong>sert<strong>in</strong>g a message <strong>in</strong>to the gateway log.Inputtype Type of log message to add.1 Errormessage2 Event3 Detailed eventPo<strong>in</strong>ter to zero term<strong>in</strong>ated UTF-8 text.Page 17 of 17<strong>Logic</strong> <strong>IO</strong> Aps Ph: (+45) 7625 0210Holmboes Allé 14 Fax: (+45) 7625 02118700 Horsens Email: <strong>in</strong>fo@logicio.comDenmarkwww.logicio.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!