eISCP protocol for Onkyo Provides minimal eISCP protocol
dev, err := eiscp.NewReceiver(*host)
if err != nil {
panic(err)
}
defer dev.Close()
// Do something else.....
err := dev.SetVolume(uint8(50))
// Process error....
enabled, err := dev.GetPower()
// Process error and state...
err := dev.WriteCommand("PWR", "01")
// Process error...
// Usually requires wait response
msg := Message{}
msg.Destination = 0x31 // Destination object
msg.Version = 0x01 // ISCP version
msg.ISCP = []byte("SOME-Command")
err := dev.WriteMessage(msg)
// Process error....
msg, err := dev.ReadMessage()
// Process error and message...