Skip to content

Commit 8f6e0bf

Browse files
Node WaitForWakeUp basics (needs checking)
1 parent 09f4606 commit 8f6e0bf

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

Visual Studio Projects/ZWaveJS.NET/ZWaveJS.NET/ZWaveNode.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,32 @@ public Task<CMDResult> HasSecurityClass(Enums.SecurityClass Class)
523523
return Result.Task;
524524
}
525525

526-
526+
// FIX ME
527+
public Task<CMDResult> WaitForWakeup()
528+
{
529+
Guid ID = Guid.NewGuid();
530+
531+
TaskCompletionSource<CMDResult> Result = new TaskCompletionSource<CMDResult>();
532+
533+
Driver.Callbacks.Add(ID, (JO) =>
534+
{
535+
CMDResult Res = new CMDResult(JO);
536+
Result.SetResult(Res);
537+
538+
});
539+
540+
Dictionary<string, object> Request = new Dictionary<string, object>();
541+
Request.Add("messageId", ID);
542+
//Request.Add("command", Enums.Commands.HasSecurityClass);
543+
Request.Add("nodeId", this.id);
544+
545+
string RequestPL = JsonConvert.SerializeObject(Request);
546+
Driver.Client.SendAsync(RequestPL);
547+
548+
return Result.Task;
549+
}
550+
551+
527552

528553
[Newtonsoft.Json.JsonProperty]
529554
internal Endpoint[] endpoints { get; set; }

0 commit comments

Comments
 (0)