YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.control.ControllerLogic Class Reference

The controller role of the server, apart from the wire (issue #325, K15, spec controller-server.md): which group a controller is on, what it may do, what its commands do to the app's playback and what state it is told. More...

Collaboration diagram for de.yaacc.sendspin.control.ControllerLogic:
Collaboration graph

Classes

class  Attachment
 The group a controller is on.
 
enum  Outcome
 What a command came to. More...
 
class  View
 A moment of what a controller is told.
 

Public Member Functions

 ControllerLogic (PlaybackBridge bridge, String serverName, SecureRandom random)
 
 ControllerLogic (PlaybackBridge bridge, String serverName, de.yaacc.sendspin.GroupIds groupIds, SecureRandom random)
 
String groupIdOf (String key)
 The protocol id of a group: 32 random bytes, base64url without padding (43 characters), kept while the app runs.
 
View view (Attachment attachment, long nowMicros)
 What the controller on this attachment is told now.
 
ColorAnalyzer.Frame colorOf (Attachment attachment)
 Only the colours of the group of this attachment now (cheap: the colour role is asked about several times a second), or null.
 
Outcome handle (Attachment attachment, ControllerServerMessages.Command command)
 Does what a controller's command asks, on the group it is on; the caller runs this off the connection's thread.
 

Detailed Description

The controller role of the server, apart from the wire (issue #325, K15, spec controller-server.md): which group a controller is on, what it may do, what its commands do to the app's playback and what state it is told.

Pure: the app is behind a PlaybackBridge. Each controller connection has an Attachment; the logic itself is shared and thread safe as far as its bridge is.

Constructor & Destructor Documentation

◆ ControllerLogic()

de.yaacc.sendspin.control.ControllerLogic.ControllerLogic ( PlaybackBridge bridge,
String serverName,
de.yaacc.sendspin.GroupIds groupIds,
SecureRandom random )
Parameters
groupIdsthe ids of the groups, shared with the players' connections: one group has one id for everyone

Member Function Documentation

◆ view()

View de.yaacc.sendspin.control.ControllerLogic.view ( Attachment attachment,
long nowMicros )

What the controller on this attachment is told now.

nowMicros is the server clock.

Referenced by de.yaacc.sendspin.control.ControllerHost.Session.refresh(), and de.yaacc.sendspin.control.ControllerHost.Session.start().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: