210 likes | 228 Views
Allegro Software is a privately held and profitable company founded in 1996. We offer embedded Internet toolkits and software for device management, web services, email, and Universal Plug and Play (UPnP) technology.
E N D
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
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
Allegro Product Line • Embedded Web Services Technology • Web Servers - RomPager • Web Clients - RomWebClient • XML services - RomXML • Embedded Email • SMTP Clients - RomMailer • POP3 Clients - RomPOP
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
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
RomUPNP Basic DevicePlugBuild.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>
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);
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.)
RomUPNP Advanced DevicePlugBuild.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>
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);
RomUPNP Advanced DeviceEventing API • Integrated Event Handling • Application provides Variable List • RomUPNP builds Notification Message • HTTP Client Sends Event Notifications to concerned subscribers extern Boolean RuPublishUpnpEvent(void *theTaskDataPtr, Unsigned16 theServiceId, Unsigned16 theServiceIndex, char **theVarList, Unsigned16 theVarListLength);
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
RomUPNP Control PointSearch 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);
RomUPNP Control PointListen for UPnP Device Announcements void CpRegisterSsdpListener(void *theTaskDataPtr, cpSsdpListenerFuncPtr theListenerFuncPtr); ypedef enum { eCpSsdpAlive, eCpSsdpBye, eCpSsdpExpired } cpSsdpNotifyStatus; typedef void (*cpSsdpListenerFuncPtr)(cpSsdpNotifyStatus theStatus, cpDiscoveryInfoPtr theDiscoveryInfoPtr);
RomUPNP Control PointRetrieve Device/Service Descriptions • Integrated Retrieval • HTTP Client Retrieves Descriptions • XML Parser turns into C structures 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);
RomUPNP Control PointControl UPnP Device with Actions • Integrated Action Handling • Application provides Action Arguments • RomUPNP builds XML/SOAP request • HTTP Client Sends/Retrieves SOAP request • RomUPNP parses XML/SOAP response 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);
RomUPNP Control PointSubscribe and Receive Events • Integrated Event Handling • Application provides Variable Action routines • HTTP Server receives Event Notification • RomXML Parses Event Variables • Variable sent to Variable Action routines 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);
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