romupnp toolkits bob van andel president allegro software

21
RomUPNP Toolkits Bob Van Andel President Allegro Software

Upload: amos-green

Post on 18-Dec-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Toolkits

Bob Van Andel

President

Allegro Software

Page 2: RomUPNP Toolkits Bob Van Andel President Allegro Software

About Allegro Software

Leading provider of embedded Internet toolkits

Founded 1996, Boxborough, MA

Privately held, profitable, debt-free

Selected customers Agilent, APC, Cisco, D-Link, Echostar, Extreme Networks, Foundry Networks, Gemstar, McData, Nielsen, Netopia, Proxim, Sony, 3Com, Xerox, Zyxel

Page 3: RomUPNP Toolkits Bob Van Andel President Allegro Software

Embedded Product Line Highly Portable

ANSI-C Software Abstraction Layer No file system required

Small Footprint, Custom Developed

Any RTOS and TCP stack INTEGRITY, OSE, ThreadX, AMX, uCOS, Nucleus, VRTX, MQX, QNX, pSOS, VxWorks, Windows, Unix, Linux

Page 4: RomUPNP Toolkits Bob Van Andel President Allegro Software

Allegro Product Line

Embedded Web Services Technology Web Servers - RomPager Web Clients - RomWebClient XML services - RomXML

Embedded Email SMTP Clients - RomMailer POP3 Clients - RomPOP

Page 5: RomUPNP Toolkits Bob Van Andel President Allegro Software

Allegro Product Line - II Device Management

Command Line Interface - RomCLI

Universal Plug and Play Technology Basic Device - RomUPNP Basic Full Device - RomUPNP Advanced Control Point - RomUPNP Control

Page 6: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Basic Device

Discovery Services (SSDP)

Uses RomPager Web Server for Description and Presentation

Small Runtime Footprint (15- 25KB)

Simple API

Leverages Windows Desktop Services

Page 7: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP ToolkitsProcess Flow

PlugBuilderUPnP CompilerCompiler,Linker, etc.PlugBuild.xmlDevice.xmlServices.xml

BootImageSSDP Control TablesDevice.c, Device_v.cServices.c

Page 8: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Basic Device PlugBuild.xml sample

<a:RomUPNP xmlns:a="urn:schemas-allegro-com:romupnp-toolkit-1-0"> <Support>Basic</Support> <DeviceDescription file=”Description.xml”> <device id=”1234”> <serialNumber> <a:GetData Access="Direct" AccessPtr="gDeviceSerialNumber" DataType="String"> </serialNumber> <UDN> <a:GetData Prefix=“uuid:” AccessType="Direct" AccessPtr="gRootDeviceUdn" DataType="String"> </UDN> </device> </DeviceDescription> <ServiceDescription file=”Services.xml”> </ServiceDescription></a:RomUPNP>

Page 9: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Basic DeviceDiscovery (SSDP) API

extern void UpnpNotifyInit(void * theTaskDataPtr,Unsigned32 theMaxAge,Unsigned32 theNotifyPeriod,Unsigned8 theXmitCount,Unsigned8 theXmitPeriod,Unsigned8 theTimeToLive,char * theDescriptionPath,upnpDeviceInfoPtr theDeviceInfoPtr);

extern void UpnpNotifyShutdown(void * theTaskDataPtr,ruCompletionFuncPtr theCompletionFunctionPtr);

Page 10: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Advanced Device Discovery, Description, Presentation

Adds Control and Eventing Services

Includes RomPager Advanced

Includes RomWebClient

Includes Full RomXML Parser/Framer

Small Runtime Footprint (<100Kb)

Sample Templates for devices (IGD, etc.)

Page 11: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Advanced Device PlugBuild.xml sample

<a:RomUPNP xmlns:a="urn:schemas-allegro-com:romupnp-toolkit-1-0"> <Support>Advanced</Support> <DeviceDescription file=”Description.xml”> <device id=”1234”> <serialNumber> <a:GetData Access="Direct" AccessPtr="gDeviceSerialNumber" DataType="String"> </serialNumber> <UDN> <a:GetData Prefix=“uuid:” AccessType="Direct" AccessPtr="gRootDeviceUdn" DataType="String"> </UDN> </device> </DeviceDescription> <ServiceDescription type="urn:schemas-upnp-org:service:serviceType:v” file=”Services.xml” > <action name=”DoSomething” handler=”MyDoSomethingAction” /> <action name=”DoSomethingElse” handler=”MyDoSomethingElseAction” /> </ServiceDescription></a:RomUPNP>

Page 12: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Advanced DeviceControl API

typedef struct {Unsigned16 fServiceIndex;void * fInArgPtr; /* Argument list for Action */void * fOutArgPtr; /* Normal Reply Arguments */upnpErrorBody * fErrorPtr;char * fNamePtr; /* Action Name */

} rpSoapActionArg, *rpSoapActionArgPtr;

typedef enum {eSoapCompleteOk,eSoapPending,eSoapCompleteErr

} rpSoapResponse;

static rpSoapResponse MyDoSomethingAction(void *theTaskDataPtr, rpSoapActionArgPtr theActionArgPtr);

Page 13: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Advanced DeviceEventing API

extern Boolean RuPublishUpnpEvent(void *theTaskDataPtr, Unsigned16 theServiceId, Unsigned16 theServiceIndex,char **theVarList, Unsigned16 theVarListLength);

Integrated Event Handling Application provides Variable List RomUPNP builds Notification Message HTTP Client Sends Event Notifications to concerned

subscribers

Page 14: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Control Point Discovery, Description, Control, Events

Includes Web Server, Web Client, XML

Search for UPnP Devices

Listen for UPnP Device Announcements

Retrieve Device/Service Descriptions

Control UPnP Device with Actions

Subscribe and Receive Events

Page 15: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Control Point Search for UPnP Devices

typedef enum {eCpReportAll,eCpReportRoot,eCpReportDevice,eCpReportUPnPDeviceType,eCpReportDomainDeviceType,

} cpFilterType;

extern cpSearchStatus CpInitSearch(void * theTaskPointer, cpFilterType theSearchTarget, char * theSearchData, Unsigned8 theXmitCount, Unsigned8 theXmitPeriod, Unsigned8 theTimeToLive, cpSearchCompletionFuncPtr theSearchCompletionPtr, void * theCookie);

typedef void (*cpSearchCompletionFuncPtr)(cpSearchStatus theStatus, void * theCookie, cpDiscoveryInfoPtr theDiscoveryInfoPtr);

Page 16: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Control Point Listen for UPnP Device Announcements

void CpRegisterSsdpListener(void *theTaskDataPtr, cpSsdpListenerFuncPtr theListenerFuncPtr); ypedef enum {

eCpSsdpAlive,eCpSsdpBye,eCpSsdpExpired

} cpSsdpNotifyStatus;

typedef void (*cpSsdpListenerFuncPtr)(cpSsdpNotifyStatus theStatus, cpDiscoveryInfoPtr theDiscoveryInfoPtr);

Page 17: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Control Point Retrieve Device/Service Descriptions

extern cpGetStatus CpGetDeviceDescription(void *theTaskDataPtr, cpDevicePtr theDevicePtr,void * theParsedDataBufferPtr,Unsigned32 theParsedDataBufferSize,CpGetCompletionFuncPtr theCompletionFunctionPtr, void * theCookie);

typedef void (*cpGetCompletionFuncPtr)(cpGetStatus theStatus, cpRootDeviceDataPtr theRootDataPtr, Unsigned32 theDataSize, void * theCookie);

Integrated Retrieval HTTP Client Retrieves Descriptions XML Parser turns into C structures

Page 18: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Control Point Control UPnP Device with Actions

void CpInvokeAction(void * theTaskDataPtr, cpDeviceDataPtr theDeviceDataPtr,char * theServiceIdPtr, char * theActionName,void * theActionArgsPtr, void * theActionResponsePtr,cpActionCompletionPtr theCompletionFuncPtr,void * theCookie);

typedef void (*cpActionCompletionPtr)(cpActionStatus theStatus, void * theCookie, cpActionErrorInfoPtr theErrorInfoPtr);

Integrated Action Handling Application provides Action Arguments RomUPNP builds XML/SOAP request HTTP Client Sends/Retrieves SOAP request RomUPNP parses XML/SOAP response

Page 19: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Control Point Subscribe and Receive Events

cpSubStatus CpSubscribe(void * theTaskDataPtr, cpDeviceDataPtr theDeviceDataPtr,char * theServiceIdPtr, Unsigned16 theDeviceInstanceIndex,Unsigned16 theServiceInstanceIndex,cpSubNotificationFuncPtr theNotificationFuncPtr,void * theCookie);

typedef void (*cpSubNotificationFuncPtr)(cpSubStatus theStatus, void *theSubscription, void *theCookie);

Integrated Event Handling Application provides Variable Action routines HTTP Server receives Event Notification RomXML Parses Event Variables Variable sent to Variable Action routines

Page 20: RomUPNP Toolkits Bob Van Andel President Allegro Software

RomUPNP Toolkits RomUPNP Basic Device

Simple Discovery, Description, Presentation

No SOAP, or XML parsing required

RomUPNP Advanced Device Full UPnP Implementation

RomUPNP Control Point Full UPnP Implementation

Page 21: RomUPNP Toolkits Bob Van Andel President Allegro Software

For the interconnected lifestyle