buf.writeByte(3);
super.write(ctx, buf, promise);
super.flush(ctx); // TODO why do I need to explicitly call flush for this to work??? empty data??
}else if (event.getType() == RemoteRxEvent.Type.subscribed){
logger.debug("WRITE request for RemoteRxEvent: subscribed");
buf.writeByte(4);
Map<String,String> subscribeParameters = event.getSubscribeParameters();
if (subscribeParameters != null && !subscribeParameters.isEmpty()){
byte[] subscribeBytes = fromMapToBytes(subscribeParameters);
buf.writeInt(subscribeBytes.length); // write int for length
buf.writeBytes(subscribeBytes); // write data