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
|
2021-05-11 19:09:57 +01:00
|
|
|
[System.Collections.ArrayList]$vban_in
|
|
|
|
[System.Collections.ArrayList]$vban_out
|
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
|
2021-05-11 19:09:57 +01:00
|
|
|
$this.vban_in = Vban_In
|
|
|
|
$this.vban_out = Vban_Out
|
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
|