CIIClient
@interface CIIClient : NSObject
The CII Protocol Client class for receiving CII state updates from the TV. It uses the InterDevSyncURL from a discovered TV (via DIAL; See DIALDevice class in DIALDeviceDiscovery component) to make a websocket connection with the CII protocol server running on the TV.
CII messages when received are classified as a new unseen message (the first CII message from a newly discovered TV) or as an update. Events are produced to notify observers about a new CII or the field(s) that were updated in the CII message. The events report changes to the CII state by sending a copy of the CII object and a CIIChangeStatus bitmask for identifying the fields in the state that were changed in the last CII protocol message.
Please note that this CII Protocol Client implementation acts an endpoint to only one CII server. i.e. only one CII object is maintained.
Events produced = {CIIConnectionFailure, CIIDidChange} Events required = None.
-
CII protocol server endpoint URL. Readonly.
Declaration
Objective-C
@property (readonly, nonatomic) NSString *ciiUrl;
Swift
var ciiUrl: String! { get }
-
Initialise a CIIClient object during instantiation.
Declaration
Objective-C
- (id)initWithCIIURL:(NSString *)cii_url;
Swift
init!(ciiurl cii_url: String!)
Parameters
cii_url
CII server endpoint URL
Return Value
CIIClient instance
-
Start the CII protocol client.
Declaration
Objective-C
- (void)start;
Swift
func start()
-
Pause the CII protocol client. To restart, call start method.
Declaration
Objective-C
- (void)pause;
Swift
func pause()
-
Stop the CII protocol client.
Declaration
Objective-C
- (void)stop;
Swift
func stop()