Home Manual Reference Source
public class | source

TaskOutput

TaskOutput collects datapoints, notifications, and assignments into one object.

Constructor Summary

Public Constructor
public

TaskOutput collects datapoints, notifications, and assignments into one object.

Member Summary

Public Members
public

Store assignments in an array.

public

datapoints: *[]

Store Datapoints in an array.

public

Store Notifications in an array.

Method Summary

Public Methods
public

Add an assignment to the task output.

public

Add a datapoint

public

Add a notification to the task output.

public

Generate an object collecting datapoints, notifications, and assignments.

public

Convert the task output to a string.

Public Constructors

public constructor() source

TaskOutput collects datapoints, notifications, and assignments into one object.

Public Members

public assignments: *[] source

Store assignments in an array.

public datapoints: *[] source

Store Datapoints in an array.

public notifications: *[] source

Store Notifications in an array.

Public Methods

public addAssignment(assn: object): TaskOutput source

Add an assignment to the task output.

Params:

NameTypeAttributeDescription
assn object

Assignment JSON object.

Return:

TaskOutput

this TaskOutput object.

public addDatapoint(dpt: *): TaskOutput source

Add a datapoint

Params:

NameTypeAttributeDescription
dpt *

Datapoint instance or JSON object.

Return:

TaskOutput

this TaskOutput object.

public addNotification(notif: object): TaskOutput source

Add a notification to the task output.

Params:

NameTypeAttributeDescription
notif object

Notification JSON object.

Return:

TaskOutput

this TaskOutput object.

public generate(): object source

Generate an object collecting datapoints, notifications, and assignments. For any datapoints, validate it's fields and generate a JSON.

Return:

object

this TaskOutput object's data.

public toString(): string source

Convert the task output to a string.

Return:

string

string representation of this TaskOutput object's data.