## Methods

destroy()
getKey()

getMeta(callback)
getState(callback)

start(callback)
stop(callback)

## Abstract types

getMetaCallback(err, data)
getStateCallback(err, state)

startCallback(err)
stopCallback(err)

## new _Sequence()

Sequence.
May not be directly instanced. An instance of the class is created by the method HomeServerConnector._Connection#getSequence.

### Example

    var sq = conn.getSequence("SQ@MySequence", function(err, data) {});

## Methods

### destroy()

Enables the object and cancels any existing subscription.

#### Example

    sq.destroy();

### getKey() → String

Returns the key of the object.

#### Example

    var object_key = sq.getKey();

Returns

  `String`

### getMeta(callback)

Retrieves the metadata.

#### Example

Retrieval of metadata.

    sq.getMeta(function(err, data) {});

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
callback | function() |  | HomeServerConnector._Sequence~getMetaCallback

### getState(callback)

Returns the status of the sequence: Sequence is running / is not running

#### Example

Retrieval of the status.

    sq.getState(function(err, state) {});

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
callback | function() |  | HomeServerConnector._Sequence~getStateCallback

### start(callback)

Starts a sequence.

#### Example

Start sequence.

    sq.start(function(err) {});

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
callback | function() |  | HomeServerConnector._Sequence~startCallback

### stop(callback)

Stops a running sequence.

#### Example

Stop sequence.

    sq.stop(function(err) {});

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
callback | function() |  | HomeServerConnector._Sequence~stopCallback

## Abstract types

inner

### getMetaCallback(err, data)

#### Example

Retrieval of metadata.

    sq.getMeta(function(err, data) {});

#### Parameters

Name | Type | Optional | Description
--- | --- | --- | ---
err | (Object or undefined) |  | Error object
data | Object |  | Meta information #### Structure
    {
      "keys":        Array of String,
      "caption":     String,
      "description": String,
      "tags":        Array of String,
      "restart":     Boolean
    }
#### Explanation keys - List with keys (e.g.: ["SQ:5", "SQ@MySequence"]). Contains at least one number. caption - Designation of the object. description - Description of the object. tags - List of tags (e.g.: ["Light", "Alarms"]). restart - true: The sequence can be restarted during the process.

inner

### getStateCallback(err, state)

#### Example

Retrieval of the status.

    sq.getState(function(err, state) {});

#### Parameters

Name | Type | Optional | Description
--- | --- | --- | ---
err | (Object or undefined) |  | Error object
state | Boolean |  | true: Sequence is running - false: Sequence is not running.

inner

### startCallback(err)

#### Example

Start sequence.

    sq.start(function(err) {});

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
err | (Object or undefined) |  | Error object

inner

### stopCallback(err)

#### Example

Stop sequence.

    sq.stop(function(err) {});

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
err | (Object or undefined) |  | Error object