NetSender clients require the ability to change their mode

Issue #10 resolved
Alan Noble created an issue

The mode is a special NetReceiver variable used by clients to control their operating mode. The default mode is "Normal". Other common modes are "Paused" (to pause an operation) and "Stop" to stop an operation. Currently clients are told what to do by NetReceiver and have no ability to change the mode themselves.

It is proposed to add the following:

func (ns *Sender) Mode() string
func (ns *Sender) SetMode(mode string) 

Further more, the client's mode will be appended to all NetReceiver requests, to enable the latter to check for client-initiated mode changes.

This will be used to implement a new "Burst" mode in revid.

Note that the Mode() getter is required to synchronize access to a new Sender.mode member.

Comments (3)

  1. Alan Noble reporter

    Update: Client mode changes are communicated to NetReceiver by means of a new md param appended to /vars request, i..e.,

    /vars?ma=MAC&dk=DKEY&md=NEWMODE

    The vars response will then include the new value for the mode.

    Other requests (/poll, /config, etc.) are not used.

  2. Log in to comment