-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix up Smart Start #71
base: 4.0.0
Are you sure you want to change the base?
Conversation
After some input from @AlCalzone, this PR reps the following.
/* Your last PR - I added a default status */
public SmartStartProvisioningEntry(string dsk, SecurityClass[] securityClasses, Protocols protocol = Protocols.ZWave, ProvisioningEntryStatus status = ProvisioningEntryStatus.Active)
{
this.dsk = dsk;
this.securityClasses = securityClasses;
this.requestedSecurityClasses = securityClasses;
this.protocol = protocol;
this.status = status;
this.supportedProtocols = new Protocols[1] { protocol };
} /* From a Parsed QR */
public SmartStartProvisioningEntry(QRProvisioningInformation ProvisioningInformation, Protocols protocol = Protocols.ZWave, ProvisioningEntryStatus status = ProvisioningEntryStatus.Active)
{
if(!ProvisioningInformation.supportedProtocols.Contains(protocol))
{
throw new NotSupportedException("The provided protocol is not supported by this device.");
}
this.dsk = ProvisioningInformation.dsk;
this.securityClasses = ProvisioningInformation.securityClasses;
this.requestedSecurityClasses = ProvisioningInformation.securityClasses;
this.supportedProtocols = ProvisioningInformation.supportedProtocols;
this.protocol = protocol;
this.status = status;
} The
@AlCalzone, I believe this should fall more in line with what References:
|
The QR code can also contain additional info, like manufacturer and label. While it is not required to provision a node, it would still be good to copy all additional properties (that have a value) from QRProvisioningInformation to the PlannedProvisioningEntry, so they get persisted in the cache. |
Right! I do that anyway, in NR - Thanks |
No description provided.