Mixin: NodeInstructionUrlHelperMixin

net~ NodeInstructionUrlHelperMixin

A mixin class that adds SolarNode instruction support to module:net~UrlHelper.

Methods


<static> instructionParameter(name, value)

Create an instruction parameter suitable to passing to NodeInstructionUrlHelperMixin#queueInstructionUrl.

Parameters:
Name Type Description
name string

the parameter name

value *

the parameter value

Returns:

with name and value properties

Type
object

queueInstructionUrl(topic [, parameters] [, nodeId])

Generate a URL for posting an instruction request.

Parameters:
Name Type Argument Description
topic string

the instruction topic.

parameters Array.<Object> <optional>

an array of parameter objects in the form {name:n1, value:v1}.

nodeId number <optional>

a specific node ID to use; if not provided the nodeId property of this class will be used

Returns:

the URL

Type
string

updateInstructionStateUrl(instructionId, state)

Generate a URL for changing the state of an instruction.

Parameters:
Name Type Description
instructionId number

the instruction ID to update

state InstructionState

the instruction state to set

See:
  • the InstructionStates enum for possible state values
Returns:

the URL

Type
string

viewActiveInstructionsUrl( [nodeId])

Generate a URL for viewing active instructions.

Parameters:
Name Type Argument Description
nodeId number <optional>

a specific node ID to use; if not provided the nodeId property of this class will be used

Returns:

the URL

Type
string

viewInstructionUrl(instructionId)

Generate a URL to get all details for a specific instruction.

Parameters:
Name Type Description
instructionId number

the instruction ID to get

Returns:

the URL

Type
string

viewPendingInstructionsUrl( [nodeId])

Generate a URL for viewing pending instructions.

Parameters:
Name Type Argument Description
nodeId number <optional>

a specific node ID to use; if not provided the nodeId property of this class will be used

Returns:

the URL

Type
string