2021-04-28 17:38:36 +01:00
|
|
|
. $PSScriptRoot\base.ps1
|
|
|
|
|
|
|
|
class Remote {
|
|
|
|
[String]$type
|
|
|
|
[System.Collections.ArrayList]$button
|
|
|
|
[System.Collections.ArrayList]$strip
|
|
|
|
[System.Collections.ArrayList]$bus
|
2022-01-06 15:28:43 +00:00
|
|
|
[PSCustomObject]$vban
|
2021-08-23 15:24:05 +01:00
|
|
|
$command
|
2021-04-28 17:38:36 +01:00
|
|
|
|
|
|
|
# Constructor
|
|
|
|
Remote ([String]$type)
|
|
|
|
{
|
|
|
|
$this.type = $type
|
2021-04-29 20:23:02 +01:00
|
|
|
$this.Setup()
|
2021-04-28 17:38:36 +01:00
|
|
|
}
|
|
|
|
|
2021-04-30 17:07:09 +01:00
|
|
|
[void] Setup() {
|
2021-05-04 17:29:38 +01:00
|
|
|
if(Setup_DLL) {
|
|
|
|
Login -TYPE $this.type
|
|
|
|
|
|
|
|
$this.button = Buttons
|
|
|
|
$this.strip = Strips
|
|
|
|
$this.bus = Buses
|
2022-01-06 15:28:43 +00:00
|
|
|
$this.vban = Vban
|
2021-08-23 15:24:05 +01:00
|
|
|
$this.command = Special
|
2021-05-04 17:29:38 +01:00
|
|
|
}
|
|
|
|
else { Exit }
|
2021-04-28 17:38:36 +01:00
|
|
|
}
|
|
|
|
|
2021-04-30 17:07:09 +01:00
|
|
|
[void] Logout() {
|
2021-04-28 17:38:36 +01:00
|
|
|
Logout
|
|
|
|
}
|
2021-04-30 17:07:09 +01:00
|
|
|
|
2021-04-30 16:47:15 +01:00
|
|
|
[void] Set_Multi([HashTable]$hash) {
|
|
|
|
Param_Set_Multi -HASH $hash
|
|
|
|
}
|
2021-04-28 17:38:36 +01:00
|
|
|
}
|
2021-04-30 17:07:09 +01:00
|
|
|
|
|
|
|
Function Get-RemoteBasic {
|
|
|
|
return [Remote]::new('basic')
|
|
|
|
}
|
|
|
|
|
|
|
|
Function Get-RemoteBanana {
|
|
|
|
return [Remote]::new('banana')
|
|
|
|
}
|
|
|
|
|
|
|
|
Function Get-RemotePotato {
|
|
|
|
return [Remote]::new('potato')
|
|
|
|
}
|
|
|
|
|
|
|
|
Export-ModuleMember -Function Get-RemoteBasic, Get-RemoteBanana, Get-RemotePotato
|