@Test public void testRequestStatus() { assertEquals("invalid message", "*#16*0*5##", requestStatus("0", Type.AMPLIFIER_GENERAL).getValue()); assertEquals("invalid message", "*#16*#0*5##", requestStatus("0", Type.AMPLIFIER_GROUP).getValue()); assertEquals("invalid message", "*#16*#9*5##", requestStatus("9", Type.AMPLIFIER_GROUP).getValue()); assertEquals("invalid message", "*#16*01*5##", requestStatus("01", Type.AMPLIFIER_P2P).getValue()); assertEquals("invalid message", "*#16*09*5##", requestStatus("09", Type.AMPLIFIER_P2P).getValue()); assertEquals("invalid message", "*#16*99*5##", requestStatus("99", Type.AMPLIFIER_P2P).getValue()); assertEquals("invalid message", "*#16*100*5##", requestStatus("100", Type.SOURCE_GENERAL).getValue()); assertEquals("invalid message", "*#16*101*5##", requestStatus("101", Type.SOURCE_P2P).getValue()); assertEquals("invalid message", "*#16*109*5##", requestStatus("109", Type.SOURCE_P2P).getValue()); }
public static SoundSystem requestStatus(String where, Type type) { checkArgument(Type.isValid(type, where), "invalid where|type"); return new SoundSystem(format(FORMAT_DIMENSION, WHO_16, buildWhereValue(where, type), STATUS)); }
SoundSystem extends BaseOpenMessage { public static SoundSystem requestStatus(String where, Type type) { checkArgument(Type.isValid(type, where), "invalid where|type"); return new SoundSystem(format(FORMAT_DIMENSION, WHO_16, buildWhereValue(where, type), STATUS)); } }
SoundSystem extends BaseOpenMessage { public static SoundSystem requestStatus(String where, Type type) { checkArgument(Type.isValid(type, where), "invalid where|type"); return new SoundSystem(format(FORMAT_DIMENSION, WHO_16, buildWhereValue(where, type), STATUS)); } protected  SoundSystem(String value); }
SoundSystem extends BaseOpenMessage { public static SoundSystem requestStatus(String where, Type type) { checkArgument(Type.isValid(type, where), "invalid where|type"); return new SoundSystem(format(FORMAT_DIMENSION, WHO_16, buildWhereValue(where, type), STATUS)); } protected  SoundSystem(String value); static SoundSystem requestTurnOn(String where, Type type, Source source); static SoundSystem requestTurnOff(String where, Type type, Source source); static Func1<OpenSession, OpenSession> handleResponse(Action0 onSuccess, Action0 onFail); static SoundSystem requestStatus(String where, Type type); static Func1<OpenSession, OpenSession> handleStatus(Action0 onStatus, Action0 offStatus); static SoundSystem requestVolumeUp(String where, Type type); static SoundSystem requestVolumeDown(String where, Type type); static SoundSystem requestStationUp(String where, Type type); static SoundSystem requestStationDown(String where, Type type); }
SoundSystem extends BaseOpenMessage { public static SoundSystem requestStatus(String where, Type type) { checkArgument(Type.isValid(type, where), "invalid where|type"); return new SoundSystem(format(FORMAT_DIMENSION, WHO_16, buildWhereValue(where, type), STATUS)); } protected  SoundSystem(String value); static SoundSystem requestTurnOn(String where, Type type, Source source); static SoundSystem requestTurnOff(String where, Type type, Source source); static Func1<OpenSession, OpenSession> handleResponse(Action0 onSuccess, Action0 onFail); static SoundSystem requestStatus(String where, Type type); static Func1<OpenSession, OpenSession> handleStatus(Action0 onStatus, Action0 offStatus); static SoundSystem requestVolumeUp(String where, Type type); static SoundSystem requestVolumeDown(String where, Type type); static SoundSystem requestStationUp(String where, Type type); static SoundSystem requestStationDown(String where, Type type);  }