MWM5 Library
0.4
0.4
  • The MWM5 Library
  • Changes & Download
  • License
  • Getting started
    • Environment
    • SDK
    • hardware
    • examples
      • AppTwelite_Recv
      • PAL_Recv
    • Using Library
      • Parser
      • Terminal
  • References
    • Parser
      • TWESERCMD
        • IParser
        • AsciiParser
      • TWEFMT
        • TwePacket, spTwePacket
          • E_PKT
          • idenify_packet_type()
          • newTwePacket()
          • refTwePacket()
        • Packet Types
          • TwePacketTwelite
            • DataTwelite
          • TwePacketPal
            • DataPal
            • E_PAL_PCB
            • PalBase
              • PalMag
              • PalAmb
              • PalMot
    • Terminal
      • TWETERM
        • ESC Sequence
        • TermAttr
        • ITerm
        • TWETerm_M5_Console
      • TWEFONT
        • FontDef
        • createFont???()
        • drawChar()
        • queryFont()
    • Basics
      • TWE
        • IStreamOut
        • Print Formatted
      • TWEUTILS
        • FixedQueue
        • SimpleBuffer
          • SmplBuf_Byte
GitBook提供
このページ内
PDFとしてエクスポート
  1. References
  2. Parser
  3. TWEFMT
  4. TwePacket, spTwePacket

newTwePacket()

パケットデータの解釈とオブジェクト生成

前へidenify_packet_type()次へrefTwePacket()

最終更新 5 年前

パケットデータのバイト列を入力として、パケット種別の判定と、種別に応じたオブジェクトを生成します。

spTwePacket newTwePacket(
		uint8_t* p,
		uint8_t u8len,
		E_PKT eType = E_PKT::PKT_ERROR)

spTwePacket newTwePacket(
		TWEUTILS::SmplBuf_Byte& sbuff,
		E_PKT eType = E_PKT::PKT_ERROR)

事前にを用いてパケットの種別が特定できている場合はeTypeを与えます。

戻り値はです。

spTwePacket
identify_packet_type()
E_PKT
spTwePacket