code: private DataFrame createDataFrame(ByteBuf buf) {
          if (buf.readableBytes() > 3) {
              byte messageType = buf.getByte(buf.readerIndex() + 3);
  
              switch (messageType) {
                  case Version.ID:
                      return new Version(buf);
                  case MemoryGetId.ID:
                      return new MemoryGetId(buf);
                  case InitData.ID:
                      return new InitData(buf);
                  case NodeProtocolInfo.ID:
                      return new NodeProtocolInfo(buf);
                  case SendData.ID:
                      return new SendData(buf);
                  case ApplicationCommand.ID:
                      return new ApplicationCommand(buf);
                  case ApplicationUpdate.ID:
                      return new ApplicationUpdate(buf);
                  case RequestNodeInfo.ID:
                      return new RequestNodeInfo(buf);
                  case GetRoutingInfo.ID:
                      return new GetRoutingInfo(buf);
                  case GetSUCNodeId.ID:
                      return new GetSUCNodeId(buf);
                  case AddNodeToNetwork.ID:
                      return new AddNodeToNetwork(buf);
                  case RemoveNodeFromNetwork.ID:
                      return new RemoveNodeFromNetwork(buf);
                  case SetDefault.ID:
                      return new SetDefault(buf);
              }
          }
          return null;
      }
docs: Creates a Z-Wave DataFrame from a ByteBuf.
  
  @param buf the buffer to process
  
  @return a DataFrame instance (or null if a valid one wasn't found)