C# 클래스 Particle.ParticleDevice

Represents a Device like the Core, Photon or Electron
상속: ParticleBase
파일 보기 프로젝트 열기: ParticleNET/ParticleSDK 1 사용 예제들

공개 메소드들

메소드 설명
CallFunctionAsync ( String functionName, String arg ) : Task>

Calls the function asynchronous.

FlashExampleAppAsync ( String exampleId ) : Task

Flashes the example application asynchronous.

FlashKnownAppAsync ( String appName ) : Task

Flashes a known application to a device.

GetVariableValueAsync ( String variable ) : Task>

Gets the variable value asynchronous for the provided variable name.

GetVariableValueAsync ( Particle.Variable variable ) : Task>

Gets the variable value asynchronous for the provided variable.

RefreshAsync ( ) : Task

Refreshes the device from the cloud.

RenameAsync ( String newName ) : Task

Renames the Device.

UnclaimAsync ( ) : Task

Unclaims the Device asynchronous.

보호된 메소드들

메소드 설명
ParseFunctions ( Newtonsoft.Json.Linq.JArray arr ) : void

Parses the functions.

ParseObject ( Newtonsoft.Json.Linq.JObject obj ) : void

Parses the provided JObject into a ParticleDevice

ParseVariables ( Newtonsoft.Json.Linq.JObject obj ) : void

Parses the variables.

ParticleDevice ( ParticleCloud cloud, Newtonsoft.Json.Linq.JObject obj ) : Newtonsoft.Json

Initializes a new instance of the ParticleDevice class.

비공개 메소드들

메소드 설명
getVariableType ( JToken type ) : VariableType

Gets the type of the variable. if the type does not match a known type returns VariableType.String

parseBooleanValue ( JToken token ) : bool
parseDateTimeValue ( JToken token ) : DateTime?
parseIntValue ( JToken token ) : int
parseNullableIntValue ( JToken token ) : int?
parseStringValue ( JToken token ) : String

메소드 상세

CallFunctionAsync() 공개 메소드

Calls the function asynchronous.
public CallFunctionAsync ( String functionName, String arg ) : Task>
functionName String Name of the function.
arg String The argument.
리턴 Task>

FlashExampleAppAsync() 공개 메소드

Flashes the example application asynchronous.
a null example id is passed
public FlashExampleAppAsync ( String exampleId ) : Task
exampleId String The example identifier. This can be found at build.particle.io
리턴 Task

FlashKnownAppAsync() 공개 메소드

Flashes a known application to a device.
public FlashKnownAppAsync ( String appName ) : Task
appName String Name of the application.
리턴 Task

GetVariableValueAsync() 공개 메소드

Gets the variable value asynchronous for the provided variable name.
public GetVariableValueAsync ( String variable ) : Task>
variable String The variable.
리턴 Task>

GetVariableValueAsync() 공개 메소드

Gets the variable value asynchronous for the provided variable.
public GetVariableValueAsync ( Particle.Variable variable ) : Task>
variable Particle.Variable The variable.
리턴 Task>

ParseFunctions() 보호된 메소드

Parses the functions.
protected ParseFunctions ( Newtonsoft.Json.Linq.JArray arr ) : void
arr Newtonsoft.Json.Linq.JArray The arr.
리턴 void

ParseObject() 보호된 메소드

Parses the provided JObject into a ParticleDevice
is null There was an error parsing the json provided. (This should be added as an issue when it happens)
protected ParseObject ( Newtonsoft.Json.Linq.JObject obj ) : void
obj Newtonsoft.Json.Linq.JObject The object.
리턴 void

ParseVariables() 보호된 메소드

Parses the variables.
protected ParseVariables ( Newtonsoft.Json.Linq.JObject obj ) : void
obj Newtonsoft.Json.Linq.JObject The object.
리턴 void

ParticleDevice() 보호된 메소드

Initializes a new instance of the ParticleDevice class.
protected ParticleDevice ( ParticleCloud cloud, Newtonsoft.Json.Linq.JObject obj ) : Newtonsoft.Json
cloud ParticleCloud The cloud.
obj Newtonsoft.Json.Linq.JObject The JSon object to parse
리턴 Newtonsoft.Json

RefreshAsync() 공개 메소드

Refreshes the device from the cloud.
public RefreshAsync ( ) : Task
리턴 Task

RenameAsync() 공개 메소드

Renames the Device.
public RenameAsync ( String newName ) : Task
newName String The new name.
리턴 Task

UnclaimAsync() 공개 메소드

Unclaims the Device asynchronous.
public UnclaimAsync ( ) : Task
리턴 Task