Home
SCCT subscriber for iOS
Contents
1. 11 Ta do ssiri 14 SCCT_DigitalDataPackage 000000n00 11 13 openCommunication port apikey SCCT DigitalLineConfiguration GESSELPCLON R vu 20 SGCT_ErrorPackage icsiscsisecssissssiseisiasoesontes 12 packageWithMessage withCode 14 SCCT_FilePackage s s s 14 15 packageWithXml eee 14 SCCT Filter sacre tie e Essen 19 r egisterObSS VEL S siemens 20 SCCT_ImagePackage 15 17 SENAR K R 15 SCCT MessagePackage secese 14 SSR T MAGS issues 15 17 SCCT_Package SendMessage 1 eee eee 14 SCCT Subject re GEER 14 15 17 19 SCCT_XmlPackage een 14 Listeners analogDataListener 13 unregisterObserver u 20 Protocols SCCT Observer 9 10 11 13 14 configurationListener sess 11 SCCT publisher mungseunsenvmrns unuimesdniene 7 9 digitalDataListener nsss 13 SCCT subs rIbers sentant 7 TOOLS for SMART MINDS 22 Smartphone amp Cross platform Communication Toolkit User Manual
2. subject sendFilter filter ANALOG DATA FILTER Analog data filter is represented by SCCT AnalogDataFilter class In analog data filter you can select the channels also scattered and the sources to receive To select channels and columns you can use the following methods void selectChannelsFrom NSUInteger from Select the channels from from to to to NSUInteger from void selectChannels NSArray channels Select the indexes of channels in the array void selectSources NSArray sources Select the ids of sources in the array void setQuery NSString query The query syntax is c1 c2 s1 s2 or alternatively c3 c4 s1 s2 In the first case are selected the channels from c1 to c2 In the second case instead the channels c3 and c4 only are selected In both cases the sources s1 and s2 are selected The following example explains how to select the channels from 1 to 3 of the sources 0 and 2 SCCT AnalogDataFilter filter SCCT_AnalogDataFilter alloc init filter query 1 3 0 2 subject sendPackage filter SENDING FILTER PACKAGE In order to send a subclass of SCCT Filter object you have to use the following method of SCCT Subject object NSUInteger sendFilter SCCT Filter filter 19 REGISTER AND UNREGISTER OBSERVERS The first thing to do in order to allow Observer to receive data is registering it to
3. You can download all versions of SCCT subscriber and publisher libraries from www toolsforsmartminds it products SCCT php E E In the next chapters it is described how to configure and use this library DOCSET INSTALLATION In the SCCT library package you find also the docset file Copy it into the Library Developer Shared Documentation DocSets folder to see the SCCT documentation in the Documentation browser of XCode TOOLS for SMART MINDS 8 Smartphone amp Cross platform Communication Toolkit User Manual How SCCT SUBSCRIBER FOR IOS WORKS As said in the General Working chapter SCCT is composed of two parts a publisher and a subscriber SCCT for iOS works as subscriber during the data exchanging and has to manage the connection with the publisher In order to do this SCCT for iOS implements the Observer pattern This is a pattern intuitively used as an architectural base of a lot of event management systems This pattern is substantially based on one or more objects called observers or listeners that are registered to manage an event that may be generated by the observed object called subject In particular this library provides you with the following elements SCCT Subject is a class that has the task of managing in a direct way the communication with the data producer SCCT publisher of providing methods that allow the connection with SCCT_Observer and enable the data sending SCCT_Observer
4. the name or the description of the channel Direction indicates if it is an input or output channel this field can have Input or Output Unit the measurement unit of the channel SamplingRate the sampling rate of the channel MinValue the minimum value that the channel can assume MaxValue the maximum value that the channel can assume Index the index of the channel LINE CONFIGURATION SCCT DigitalLineConfiguration objects are held in the digitallines NSArray property of SCCT ConfigurationPackage object SCCT DigitalLineConfiguration has the following properties Description the name or the description of the line Direction indicates if it is an input or output channel this field can have Input or Output value Index the index of the line RECEIVING CONFIGURATION PACKAGE In order to receive the configuration you have to implement the following method of SCCT Observer protocol void configurationListener SCCT ConfigurationPackage configurationPackage 11 ERROR PACKAGE The errors are generated when a problem occurs and are managed with a SCCT ErrorPackage Each error is associated with a code in the SCCT ErrorPackage class there is an enumeration of error codes The error is a particular type of package because unlike other packages it doesn t hold data but advises that an unexpected event happened In addictions this package can be als
5. Analog Data Filter Sending Filter package REGISTER AND UNREGISTER OBSERVERS OPENING AND CLOSING COMMUNICATION START AND STOP TRANSMISSION SOURCES FIGURE INDEX INDEX 14 15 15 15 15 15 16 16 17 18 18 19 19 20 20 20 21 22 22 ABOUT THIS MANUAL The Smartphone amp Cross platform Communication Toolkit User Manual describes the virtual instruments VIs used to communicate and pass data between LabVIEW and either a local or remote application You should be familiar with the operation of LabVIEW your computer and your computer operating system CONVENTIONS The following conventions appear in this manual gt The symbol leads you through nested menu items and dialog box options to a final action The sequence Tools Options directs you to pull down the Tools menu select Options item Bold Bold text denotes items that you must select or click on the software such as menu items and dialog box options Bold text also denotes parameter names italic Italic text denotes variables emphasis a cross reference or an introduction to a key concept This font also denotes text that is a placeholder for a word or value that you must supply monospace Text in this font denotes text or characters that you should enter from the keyboard sections of code programming examples and syntax examples This font is also used for the proper names of disk drives paths directories programs
6. is a protocol that any class can implement It provides optional methods that are needed to receive all sent data NB It starts to receive data only after having been registered to the Subject You can implement one or more of these methods according to your needs You can define observers with different roles e SCCT Package is an abstract class from which other classes inherit These classes holds different kinds of data and each type of package is sent in different listeners of SCCT Observer protocol by SCCT Subject for more details see Packages chapter SCCT Subject observer Collection When a new package arrives the subject sends it to all registered observers ConcreteObserverB HOW DATA PACKAGES ARE MANAGED SCCT_Subject performs the methods of more SCCT_Observer objects in the main thread loop This means that if the invoked Observers methods aren t fast enough they could stand in a queue in the main thread loop and slow down the main thread performance and therefore the GUI If you need to perform long tasks with received data you are suggested to execute them through a background thread N N Va N Va Ef FIGURE 2 DIAGRAM OF A POSSIBLE PACKAGES QUEUE The packages are received by SCCT_Observer in the same order in which the publisher sent it so that the developer doesn t need to worry about to sort them The types of packages and the listeners of observer necessary to receive them
7. line you have to do as follow digitalDataPackage values objectAtIndex i boolValue RECEIVING DIGITAL DATA PACKAGE In order to receive digital data packages you have to implement the following method of SCCT Observer protocol void digitalDataListener SCCT DigitalDataPackage digitalDataPackage 13 MESSAGE PACKAGE A SCCT_MessagePackage object contains a short message with an associate code number This kind of package is useful for exchange messages or commands with the publisher e g to request some data or to tell it to start a task You can instantiate it with the initWithMessage code instance method or with the packageWithMessage withCode class method and use the instanced object to send it with the sendMessage method of SCCT Subject RECEIVING MESSAGE PACKAGE In order to receive message packages you have to implement the following method of SCCT Observer protocol void messageListener SCCT MessagePackage messagePackage SENDING MESSAGE PACKAGE In order to send SCCT MessagePackage object you have to use the following method of SCCT Subject object NSUInger sendMessage SCCT MessagePackage package XML PACKAGE A SCCT XmlPackage object contains an xml document This class doesn t validate the xml so it can be also contained a malformed xml is a developer responsibility to validate the document if necessary The document is stored in the xml
8. ART MINDS 12 Smartphone amp Cross platform Communication Toolkit User Manual ANALOG DATA PACKAGE Analog data are the sampled values of analog channels and are contained in the SCCT_AnalogDataPackage object These data are stored in a bidimensional matrix which is built by means of a NSArray containing in turn other NSArray objects of NSNumber objects the first index selects the channel and the array of sampled values associated to it the second index selects the single sampled value and returns a NSNumber object Sample values are stored in double format m values 2 143 2 145 9 342 10 00 n channels FIGURE 3 ANALOG DATA MATRIX You can use these data to show them in a label draw them in a graph or store them in a database or in a file If for example you want to get the i th value of the j th channel you have to do as follow analogDataPackage values objectAtIndex j objectAtIndex i doubleValue RECEIVING ANALOG DATA PACKAGE In order to receive the analog data packages you have to implement the following method of SCCT Observer protocol void analogDataListener SCCT AnalogDataPackage analogDataPackage DIGITAL DATA PACKAGE Digital data are values of digital lines and are contained in the SCCT DigitalDataPackage object These data are stored in a NSArray of NSNumber objects The lines status is represented in BOOL format If for example you want to get the staus of the i th
9. Description properties that are available in every kind of packages Function available only in PRO version 21 FIGURE INDEX Figure 1 Communication scheme Figure 2 Diagram of a possible packages queue Figure 3 Analog data Matrix amende ce 4s ane cncecdss utd hadde APS A meieri idee 13 Figure 4 Scenario with a multiple data source server and clients that need a subset of published data ER EA 21 INDEX Channel ss sms 11 13 doubleArrayListener eee 16 Classes errorListener ss 12 SCCT 2DArrayPackage rrrnrrnnvnrorsennnr 16 17 fileListenet sunnier 15 SCCT 2DBOOIArFay 45 ressmrssnerersmisestues 16 floatArrayListener SCCT 2DDoubleArray esseen 16 imageListener eeeeeessecseecseeeseeeeeeeeeeee 15 SCCT 2DFloatArray mm mmmmeemmmemeeeme 16 integerArrayListener e eee 16 SCCT 2DintegerArray ss 16 longArrayListener 16 SCCT 2DLONBAFTAV wa cicsnaecencasicesseatenenseeecens 16 mess ageListenert inner 14 SCCT_2DShortArray shortArrayListener eee eee 16 SCCT 2DStringArray stringArrayListener 17 SCCT_AnalogDataFilter 19 XMILLISEENEr i 14 15 SCCT_AnalogDataPackage e0s0a0e 11 13 Methods SCCT ArrayFiltersssssssscncssescseitindescessvssss 18 closeCommunication ss 20 SCCT_ChannelConfiguration 11 initWithMessage code eee 14 SCCT_ConfigurationPackage
10. EIVING IMAGE PACKAGE In order to receive image packages you have to implement the following method of SCCT Observer protocol void imageListener SCCT ImagePackage imagePackag SENDING IMAGE PACKAGE In order to send SCCT ImagePackage object you have to use the following method of SCCT Subject object NSUInteger sendImage SCCT ImagePackage package 15 ARRAY PACKAGES The array packages that inherit from the SCCT 2DArrayPackage class are a powerful way to exchange two dimensional arrays of different primitive types The supported types are Type Package double SCCT_2DDoubleArray float SCCT 2DFloatArray integer SCCT 2DintegerArray short SCCT 2DShortArray long SCCT 2DLongArray boolean SCCT 2DBoolArray String SCCT 2DStringArray Data are stored in an NSArray object accessible by means of array2D property array2S contains other NSArray objects containing the single elements of the array Each element is stored as NSSt ring in SCCT 2DStringArray and as NSNumber for all other kinds of array To understand this concept in detail the following example shows how to receive a double array and get the element at the 0 0 index as primitive type void doubleArrayListener SCCT_2DDoubleArray doubleArray NSNumber numb doubleArray array2D objectAtIndex 0 objectAtIndex 0 double value numb doubleValue You can get the dimen
11. Smartphone amp Cross platform Communication Toolkit User Manual for iOS Release 3 0 0 109 July 2013 Edition 1 TOOLS for SMART MINDS 2 Smartphone amp Cross platform Communication Toolkit User Manual Worldwide technical support and product information www toolsforsmartminds com TOOLS for SMART MINDS Corporate headquarter Via Padania 16 Castel Mella 25030 Brescia Italy Copyright O 2010 Tools for Smart Minds All rights reserved CONTENTS CONTENTS ABOUT THIS MANUAL CONVENTIONS INTRODUCTION GENERAL WORKING SCCT publisher SCCT subscriber REQUIREMENTS INSTALLATION DOCSET INSTALLATION HOW SCCT SUBSCRIBER FOR IOS WORKS HOW DATA PACKAGES ARE MANAGED PACKAGES CONFIGURATION PACKAGE Channel Configuration Line Configuration Receiving Configuration Package ERROR PACKAGE Receiving Error Package ANALOG DATA PACKAGE Receiving Analog Data Package DIGITAL DATA PACKAGE Receiving Digital Data Package MESSAGE PACKAGE Receiving Message Package Sending Message Package XML PACKAGE Receiving Xml Package Sending Xml Package TOOLS for SMART MINDS 4 Manual 10 11 11 11 11 11 12 12 13 13 13 13 14 14 14 14 14 14 Smartphone amp Cross platform Communication Toolkit User FILE PACKAGE Receiving File Package Sending File Package IMAGE PACKAGE Receiving Image Package Sending Image Package ARRAY PACKAGES Receiving array packages Sending array packages FILTERS Array Filter
12. are described in the following chapters TOOLS for SMART MINDS 10 Smartphone amp Cross platform Communication Toolkit User Manual PACKAGES SCCT manages many types of packages containing data of different kinds These packages are used to send data from SCCT Publisher to SCCT Subscriber and vice versa in a faster way than sending a few data little by little These packages are received by SCCT Subject object that sorts them to all registered SCCT Observer objects SCCT Subject also deals with sending these packages from subscriber to publisher In the following chapters are described in detail every type of package with its content and its purpose CONFIGURATION PACKAGE Configurations are contained in the SCCT ConfigurationPackage object that holds information about the used device like name and type of device and channels and lines configurations In particular a configuration refers to a specific data source and holds information about SCCT_AnalogDataPackage and SCCT DigitalDataPackage see Analog data package and Digital data package chapters Usually this package is sent at the beginning of the transmission to inform the client about how many lines and channels are used and which configuration they have CHANNEL CONFIGURATION SCCT ChannelConfiguration objects are held in the channels NSArray property of SCCT ConfigurationPackage object SCCT ChannelConfiguration has the following properties Description
13. ent needs a different 11x11 subarray it sends a another filter request As it is the second filter request the filter request generates a filterId 2 The server performs this new filter request sends the new subarray and marks transmitted packages with filterId 2 The following figure schematizes this example The use of filterId permits the client to link every received package with the first or the second filter request 0 0 0 0 100 100 Filter ID 1 Filter ID 2 100 100 ARRAY FILTER Filters of array are represented by SCCT ArrayFilter class In the constructor you have to indicate the array type on which apply the filter To select columns and rows you can use selectColoumnsFrom to or selectRowsFrom to methods to select rows and columns From parameter indicates the start value and to the final value to select Otherwise you can directly set up the query property using the following syntax r1 r2 c1 c2 where r1 is the start row r2 is the end row c1 is the start column and c2 is the end column The following example explains how to select a subarray of double from index 5 5 to 15 15 SCCT ArrayFilter filter SCCT_ArrayFilter alloc initWithType kSCCTDouble filter query 5 15 5 15 V TOOLS for SMART MINDS 18 Smartphone amp Cross platform Communication Toolkit User Manual Either way you can use the following code filter selectRowsFrom 5 to 15 filter selectColumnsFrom 5 to 15
14. hor name the creation date etc This field is optional so if the publisher sends the file without it the array will be empty NB This package is available only in PRO version RECEIVING FILE PACKAGE In order to receive file packages you have to implement the following method of SCCT Observer protocol void fileListener SCCT FilePackage filePackag SENDING FILE PACKAGE In order to send SCCT XmlPackage object you have to use the following method of SCCT Subject object NSUInteger sendFile SCCT FilePackage package IMAGE PACKAGE SCCT allows you to exchange easily images between publisher and subscriber through the SCCT ImagePackage class This class holds the following data Description The description or the name of the image Image The image received or sent You can get the image in NSData object representation using the format field to decode it or you can use the Ullmage object representation already decoded Attributes an NSArray of NSString objects containing a list of image attributes e g the file author name the creation date etc This field is optional so if the publisher sends the file without it the array will be empty Format It s the format of the image The format can be one of the following values kSCCTImageFormatPng KSCCTImageFormatJPeg kSCCTImageFormatBmp KSCCTImageFormatTiff o 0 0 o NB This package is available only in PRO version REC
15. m products labview communication library php it has the role of producer it can acquire from a remote system several types of data analog and digital data xml messages files images and sends them through the net to all clients who request it SCCT SUBSCRIBER SCCT subscriber instead of SCCT publisher is a library that has client role it receives data being sent by SCCT publisher and provides them neatly to the developer just ready to be used In order to receive data and use them the developer has only to implement the interface provided by the library Storage LabVIEW application DE i X Internet lt x SCCT publisher ET af vr SCCT Subscriber For LabVIEW for iOS FIGURE 1 COMMUNICATION SCHEME REQUIREMENTS In this chapter we make you a list of the main requirements of SCCT for iOS each of them has been tested in the indicated versions XCode 4 x version iOS 5 or later version One of the next architectures as armv7 armv7s i386 Internet connection INSTALLATION First of all you need to have XCode installed on your computer it is possible download it from Apple Store To install SCCT for iOS you have to follows next steps 1 Open XCode 2 Start your project 3 Add the headers and 1ibSCCT a files to your project using the Add Files to from File menu or drag and drop it in your project 4 Add to Other Linker Flags in your target Build Settings ObjC all load
16. o generated by SCCT for iOS itself if there is any problem in the connection or if some of these parameters are wrong Moreover whenever an error occurs the connection breaks down so this package should be handled with particular care This error can be generated because of one of these reasons Code Name Description 1 Wrong APl Key This error is thrown if API Key is incorrect 2 Wrong Timeout This error is thrown if the timeout is less than or equal tol 3 Wrong timestamp This error is thrown if the client s timestamp is too much different from the producer s one 4 Expired timeout This error is thrown if timeout is expired 5 Lost connection This error is thrown if connection breaks down before timeout expiring 6 Transmission error This error is thrown if it s impossible to send a message 7 Destination unreachable This error is thrown if it s impossible to open the connection with the producer 8 Empty address This error is thrown if the address string is empty 9 Wrong port This error is thrown if the port is less than or equal to 0 Some of them are generated by the library and have a different timestamp from other packages that are created by the producer RECEIVING ERROR PACKAGE In order to receive error packages you have to implement the following method of SCCT Observer protocol void errorListener SCCT ErrorPackage errorPackage O TOOLS for SM
17. oss platform Communication Toolkit User Manual SOURCES Sometimes data can come from different sources e g the publisher can handle two different devices or take data from different databases SCCT gives each source an ID and a description SERVER SIDE CLIENT SIDE Client A source ID 1 wants data coming from USB source description USB 6009 6009 and USB 6210 only source ID 2 source description PCI 6024 Client B wants data coming from PCI source ID 3 6024 and PCI 6229 only source description USB 6210 source ID 4 Client C source description PCI 6229 wants data coming from PCI 6229 only FIGURE 4 SCENARIO WITH A MULTIPLE DATA SOURCE SERVER AND CLIENTS THAT NEED A SUBSET OF PUBLISHED DATA SCCT allows you to operate with different sources in an easy way if the sourceFilterEnabled flag in the openCommunication method see Opening and closing communication chapter is enabled the publisher will send only the packages of selected source list By default this list is empty and you can modify it with selectSourcesList or selectSource methods The list contains the ID of selected sources If you call again this method the source list selected before is overr idden and therefore it is not cumulative with the new one If however sourceFilterEnabled flag is false the publisher will send the packages of all sources To see which source the package arrives from you can use sourceId and source
18. property as a NSSt ring object This kind of package is similar to message package but it has a different semantic purpose and then is handled differently from SCCT You can instantiate it with the initWithXml instance method or with the packageWithXm1 class method and use the instanced object to send it with the sendXml method of SCCT Subject RECEIVING XML PACKAGE In order to receive xml packages you have to implement the following method of SCCT Observer protocol void xmlListener SCCT XmlPackage xmlPackage SENDING XML PACKAGE In order to send SCCT XmlPackage object you have to use the following method of SCCT Subject object NSUInteger sendXml SCCT XmlPackage package FILE PACKAGE SCCT allows you to exchange easily any kind of file between publisher and subscriber through the SCCT FilePackage class This class holds the following data File name The name of the file File content This is a NSData object containing the content of the file received or sent O TOOLS for SMART MINDS 14 Smartphone amp Cross platform Communication Toolkit User Manual Md5 the md5 code of file This field is optional so if the publisher sent the file without calculating md5 code this string is empty When you send a file you can decide whether calculate it with a flag in the constructor Attributes an NSArray of NSString objects containing a list of file attributes e g the file aut
19. s you have to instantiate more objects In order to open the communication with the publisher you have to invoke the SCCT_Subject method that follows NSUInteger openCommunication NSString address port UInt32 port apikey NSString apikey description NSString description This method has the following parameters Address The IP address or the host name of the publisher Port The port number of the publisher ApiKey The password for authenticating the client if it s wrong you receive an ErrorPackage Description The name or the description of the client useful for the publisher to identify which client is connected Timeout The timeout value in seconds If the connection is lost and the timeout expired the library closes the communication and sends an expired timeout error to observers This value must be bigger than 1 By default this value is 10 To close the communication instead you have to invoke closeCommunication method START AND STOP TRANSMISSION When the communication is open a connection between publisher and subscriber is established but the publisher waits a client command to begin sending data The publisher can however send some packages if it considers them particularly important e g a configuration or a message error To start data transmission you have to call start method whereas you have to call stop method to stop it TOOLS for SMART MINDS 20 Smartphone amp Cr
20. sion of the array with the rowCount and columnCount properties Each array package has also an associated filter id filterld property that you can use to see which filter is applied on these data For more information about filters see Filters chapter RECEIVING ARRAY PACKAGES To receive different kinds of array you have to implements the appropriate listeners one for each type of array provided by the SCCT_Observer protocol The following table show you the provided listeners Type Listner double void doubleArrayListener SCCT_2DDoubleArray doubleArray float void floatArrayListener SCCT 2DFloatArray floatArray integer void integerArrayListener SCCT_2DintegerArray integerArray short void shortArrayListener SCCT_2DShortArray shortArray long void longArrayListener SCCT_2DLongArray longArray boolean void boolArrayListener SCCT_2DBoolArray boolArray TOOLS for SMART MINDS 16 Smartphone amp Cross platform Communication Toolkit User Manual String void stringArrayListener SCCT_2DStringArray stringArray Otherwise you can use the generic listener arrayListener that receive all kinds of array In this case you have to use the t ype property to discriminate the type of array and use it in the appropriate way void arrayListener SCCT 2DArrayPackage arrayPackage switch arrayPackage type case kSCCTString Do something wi
21. subprograms subroutines device names functions operations variables filenames and extensions and code excepts monospace italic Italic text in this font denotes text that is a placeholder for a word or value that you must supply TOOLS for SMART MINDS 6 Smartphone amp Cross platform Communication Toolkit User Manual INTRODUCTION The Smartphone amp Cross platform Communication Toolkit SCCT is a library which sets up a connection among different devices and allows data communication SCCT can send several types of data analog data digital data files images etc and all of them in a very fast and easy way The toolkit offers a set of high level functions for sending data and advanced functions for customized tasks with which SCCT has succeeded in resolving all the common problems regarding data communication In this way you can see how the communication results simplified reliable and quickened You can find more information about general features of SCCT and supported platforms in the SCCT Overview document downloadable by www toolsforsmartminds it products SCCT php GENERAL WORKING In this chapter are explained the basis of SCCT working SCCT is constituted by two complementary libraries SCCT subscriber and SCCT publisher that work together during the communication process SCCT PUBLISHER SCCT publisher is a library developed in LabVIEW to get more details about it see http toolsforsmartminds co
22. th string array break case kSCCTDouble Do something with double array break SENDING ARRAY PACKAGES In order to send a subclass of SCCT_2DArrayPackage object you have to use the following method of SCCT_Subject object NSUInteger sendArray SCCT 2DArrayPackage package 17 FILTERS To reduce the amount of bandwidth used to communicate and the cpu and memory utilization on client device SCCT 3 0 has introduced filter packages Filters allow subscribers to request a subset of data transmitted by the publisher Filters is available for analog data and for 2D array of boolean String int long short double and float For analog data filtering allows to select specific channels Otherwise for 2D arrays filtering permits you to select a subset of the available published array data Each instantiated filter is identified with a progress id called filterId The filterId permits the client to relate every received data package to the relative filter request filterId is fundamental to process received data in the right way For example if server manages a 100x100 array and a client needs a 11x11 subarray from index 5 5 to 15 15 the client sends a filter request As it is the first filter request sent to the server the filter request must generate a filterId 1 When the filter request is performed server sends the required subarray and marks transmitted packages with filterId 1 Later if the cli
23. the Subject multiple registrations are possible if you are handling more than one connection at the same time so that it makes a request for receiving all the packages that are going to arrive for which Observer has implemented the method from then on Register behaviour is very similar to that of Delegate pattern often used in Cocoa Touch framework with the only difference that with SCCT it s possible to connect more Observers to the same subject at the same time It s a good practice to register at least one Observer before opening a new connection otherwise you may lost some error or important package transmitted at the beginning i e a configuration package Then in any case it is possible adding or removing an observer in any moment also while connection is open In order to register an Observer you have to call the following method of SCCT Subject object void registerObserver id lt SCCT Observer gt observer In any moment you can decide if an Observer is no more necessary and it doesn t need data anymore In order to unregister it you have to use the following method of SCCT Subject object void unregisterObserver id lt SCCT_Observer gt observer OPENING AND CLOSING COMMUNICATION SCCT Subject is the class that deals with the communication each data passes through it Each object handles a single connection with a publisher if you want communicate at the same time with more publisher
Download Pdf Manuals
Related Search
Related Contents
AMPHASYS AG TECHNOPARK® Lucerne Platz 4 CH 施工要領書 - 株式会社リケン Téléchargement multimédia Descarga manual de uso Foremost TL-1951-EBI Instructions / Assembly Betriebsanleitung Operating Instructions Copyright © All rights reserved.
Failed to retrieve file