anchor.diff:      {ok, <<0>>};
   encode_packet_data(receive_dmx_on_change, on_change_only) ->
       {ok, <<1>>};
  -encode_packet_data(get_parameters, _) ->
  -    {ok, <<0:16>>};
  +encode_packet_data(T, UserDataSize) when T =:= get_parameters;
  +                                         T =:= get_parameters2 ->
  +    {ok, <<UserDataSize:16/little>>};
  +encode_packet_data(T, Params) when T =:= set_parameters;
  +                                   T =:= set_parameters2 ->
  +    Break = maps:get(break_time, Params, 9),
  +    MAB = maps:get(mark_after_break_time, Params, 1),
  +    Rate = maps:get(output_rate, Params, 40),
  +    UserData = maps:get(user_data, Params, <<>>),
  +    UserSize = byte_size(UserData),
  +    {ok, <<UserSize:16/little, Break:8, MAB:8, Rate:8, UserData/binary>>};
   encode_packet_data(enable_api_v2, Key) ->
       {ok, <<Key:32/little>>};
   encode_packet_data(get_hw_version, _) ->
  
positive.code: -spec encode_packet_data(enttec_packet_type(), term()) ->
      {ok, binary()} | {error, term()}.
  
  encode_packet_data(send_dmx, Data) ->
      {ok, <<0, Data/binary>>};
  encode_packet_data(send_dmx2, Data) ->
      {ok, <<0, Data/binary>>};
  encode_packet_data(assign_ports, {Dunno, Dunno}) ->
      {ok, <<Dunno, Dunno>>};
  
negative.code: 
  -spec get_packet_type(integer()) -> enttec_packet_type() | unknown.
  
  get_packet_type(2)   -> flash_page;
  get_packet_type(3)   -> get_parameters;
  get_packet_type(189) -> get_parameters2;
  get_packet_type(5)   -> received_dmx;
  get_packet_type(9)   -> change_of_state;
  get_packet_type(10)  -> get_serial;
  get_packet_type(14)  -> get_hw_version;
  get_packet_type(_)   -> unknown.
  
  -spec put_packet_type(enttec_packet_type()) -> integer() | unknown.
  
  put_packet_type(reprogram_firmware)    -> 1;
  put_packet_type(flash_page)            -> 2;
  put_packet_type(get_parameters)        -> 3;
  put_packet_type(get_parameters2)       -> 189;
  put_packet_type(set_parameters)        -> 4;
  put_packet_type(set_parameters2)       -> 195;
  put_packet_type(send_dmx)              -> 6;
  put_packet_type(send_rdm)              -> 7;
  put_packet_type(receive_dmx_on_change) -> 8;
  