「App:Library:FabGL:Class:Terminal」の版間の差分

提供: robot-jp wiki
ナビゲーションに移動検索に移動
11行目: 11行目:
 
|void activate (TerminalTransition transition=TerminalTransition::None)
 
|void activate (TerminalTransition transition=TerminalTransition::None)
  
<nowiki>:</nowiki>Activates this terminal for input and output.
+
:Activates this terminal for input and output.
 
|-
 
|-
 
|int available ()
 
|int available ()
  
<nowiki>:</nowiki>Gets the number of codes available in the keyboard queue.
+
:Gets the number of codes available in the keyboard queue.
 
|-
 
|-
 
|int availableForWrite ()
 
|int availableForWrite ()
  
<nowiki>:</nowiki>Determines number of codes that the display input queue can still accept.
+
:Determines number of codes that the display input queue can still accept.
 
|-
 
|-
 
|bool begin (BaseDisplayController *displayController, int maxColumns=-1, int maxRows=-1, Keyboard *keyboard=nullptr)
 
|bool begin (BaseDisplayController *displayController, int maxColumns=-1, int maxRows=-1, Keyboard *keyboard=nullptr)
  
<nowiki>:</nowiki>Initializes the terminal.
+
:Initializes the terminal.
 
|-
 
|-
 
|Canvas * canvas ()
 
|Canvas * canvas ()
  
<nowiki>:</nowiki>Gets associated canvas object.
+
:Gets associated canvas object.
 
|-
 
|-
 
|void clear (bool moveCursor=true)
 
|void clear (bool moveCursor=true)
  
<nowiki>:</nowiki>Clears the screen.
+
:Clears the screen.
 
|-
 
|-
 
|void connectLocally ()
 
|void connectLocally ()
  
<nowiki>:</nowiki>Permits using of terminal locally.
+
:Permits using of terminal locally.
 
|-
 
|-
 
|void connectSerialPort (HardwareSerial &serialPort, bool autoXONXOFF=true)
 
|void connectSerialPort (HardwareSerial &serialPort, bool autoXONXOFF=true)
  
<nowiki>:</nowiki>Connects a remote host using the specified serial port.
+
:Connects a remote host using the specified serial port.
 
|-
 
|-
 
|void connectSerialPort (uint32_t baud, uint32_t config, int rxPin, int txPin, FlowControl flowControl, bool inverted=false, int rtsPin=-1, int ctsPin=-1)
 
|void connectSerialPort (uint32_t baud, uint32_t config, int rxPin, int txPin, FlowControl flowControl, bool inverted=false, int rtsPin=-1, int ctsPin=-1)
  
<nowiki>:</nowiki>Connects a remote host using UART.
+
:Connects a remote host using UART.
 
|-
 
|-
 
|bool CTSStatus ()
 
|bool CTSStatus ()
  
<nowiki>:</nowiki>Reports current CTS signal status.
+
:Reports current CTS signal status.
 
|-
 
|-
 
|void deactivate ()
 
|void deactivate ()
  
<nowiki>:</nowiki>Deactivates this terminal.
+
:Deactivates this terminal.
 
|-
 
|-
 
|void disableSerialPortRX (bool value)
 
|void disableSerialPortRX (bool value)
  
<nowiki>:</nowiki>Disables/Enables serial port RX.
+
:Disables/Enables serial port RX.
 
|-
 
|-
 
|void disconnectLocally ()
 
|void disconnectLocally ()
  
<nowiki>:</nowiki>Avoids using of terminal locally.
+
:Avoids using of terminal locally.
 
|-
 
|-
 
|void enableCursor (bool value)
 
|void enableCursor (bool value)
  
<nowiki>:</nowiki>Enables or disables cursor.
+
:Enables or disables cursor.
 
|-
 
|-
 
|void end ()
 
|void end ()
  
<nowiki>:</nowiki>Finalizes the terminal.
+
:Finalizes the terminal.
 
|-
 
|-
 
|void flowControl (bool enableRX)
 
|void flowControl (bool enableRX)
  
<nowiki>:</nowiki>Allows/disallows host to send data.
+
:Allows/disallows host to send data.
 
|-
 
|-
 
|bool flowControl ()
 
|bool flowControl ()
  
<nowiki>:</nowiki>Checks whether host can receive data.
+
:Checks whether host can receive data.
 
|-
 
|-
 
|void flush (bool waitVSync)
 
|void flush (bool waitVSync)
  
<nowiki>:</nowiki>Waits for all codes sent to the display has been processed.
+
:Waits for all codes sent to the display has been processed.
 
|-
 
|-
 
|void flush ()
 
|void flush ()
  
<nowiki>:</nowiki>Waits for all codes sent to the display has been processed.
+
:Waits for all codes sent to the display has been processed.
 
|-
 
|-
 
|int getColumns ()
 
|int getColumns ()
  
<nowiki>:</nowiki>Returns the number of columns.
+
:Returns the number of columns.
 
|-
 
|-
 
|int getRows ()
 
|int getRows ()
  
<nowiki>:</nowiki>Returns the number of lines.
+
:Returns the number of lines.
 
|-
 
|-
 
|bool isActive ()
 
|bool isActive ()
  
<nowiki>:</nowiki>Determines if this terminal is active or not.
+
:Determines if this terminal is active or not.
 
|-
 
|-
 
|Keyboard * keyboard ()
 
|Keyboard * keyboard ()
  
<nowiki>:</nowiki>Gets associated keyboard object.
+
:Gets associated keyboard object.
 
|-
 
|-
 
|void loadFont (FontInfo const *font)
 
|void loadFont (FontInfo const *font)
  
<nowiki>:</nowiki>Sets the font to use.
+
:Sets the font to use.
 
|-
 
|-
 
|void localInsert (uint8_t c)
 
|void localInsert (uint8_t c)
  
<nowiki>:</nowiki>Injects keys into the keyboard queue.
+
:Injects keys into the keyboard queue.
 
|-
 
|-
 
|void localWrite (uint8_t c)
 
|void localWrite (uint8_t c)
  
<nowiki>:</nowiki>Injects keys into the keyboard queue.
+
:Injects keys into the keyboard queue.
 
|-
 
|-
 
|void localWrite (char const *str)
 
|void localWrite (char const *str)
  
<nowiki>:</nowiki>Injects a string of keys into the keyboard queue.
+
:Injects a string of keys into the keyboard queue.
 
|-
 
|-
 
|int peek ()
 
|int peek ()
  
<nowiki>:</nowiki>Reads a code from the keyboard without advancing to the next one.
+
:Reads a code from the keyboard without advancing to the next one.
 
|-
 
|-
 
|void pollSerialPort ()
 
|void pollSerialPort ()
  
<nowiki>:</nowiki>Pools the serial port for incoming data.
+
:Pools the serial port for incoming data.
 
|-
 
|-
 
|int read ()
 
|int read ()
  
<nowiki>:</nowiki>Reads codes from keyboard.
+
:Reads codes from keyboard.
 
|-
 
|-
 
|int read (int timeOutMS)
 
|int read (int timeOutMS)
  
<nowiki>:</nowiki>Reads codes from keyboard specyfing timeout.
+
:Reads codes from keyboard specyfing timeout.
 
|-
 
|-
 
|bool RTSStatus ()
 
|bool RTSStatus ()
  
<nowiki>:</nowiki>Reports current RTS signal status.
+
:Reports current RTS signal status.
 
|-
 
|-
 
|void send (uint8_t c)
 
|void send (uint8_t c)
  
<nowiki>:</nowiki>Like localWrite() but sends also to serial port if connected.
+
:Like localWrite() but sends also to serial port if connected.
 
|-
 
|-
 
|void send (char const *str)
 
|void send (char const *str)
  
<nowiki>:</nowiki>Like localWrite() but sends also to serial port if connected.
+
:Like localWrite() but sends also to serial port if connected.
 
|-
 
|-
 
|void setBackgroundColor (Color color, bool setAsDefault=true)
 
|void setBackgroundColor (Color color, bool setAsDefault=true)
  
<nowiki>:</nowiki>Sets the background color.
+
:Sets the background color.
 
|-
 
|-
 
|void setColorForAttribute (CharStyle attribute, Color color, bool maintainStyle)
 
|void setColorForAttribute (CharStyle attribute, Color color, bool maintainStyle)
  
<nowiki>:</nowiki>Selects a color for the specified attribute.
+
:Selects a color for the specified attribute.
 
|-
 
|-
 
|void setColorForAttribute (CharStyle attribute)
 
|void setColorForAttribute (CharStyle attribute)
  
<nowiki>:</nowiki>Disables color for the specified attribute.
+
:Disables color for the specified attribute.
 
|-
 
|-
 
|void setForegroundColor (Color color, bool setAsDefault=true)
 
|void setForegroundColor (Color color, bool setAsDefault=true)
  
<nowiki>:</nowiki>Sets the foreground color.
+
:Sets the foreground color.
 
|-
 
|-
 
|void setLogStream (Stream &stream)
 
|void setLogStream (Stream &stream)
  
<nowiki>:</nowiki>Sets the stream where to output debugging logs.
+
:Sets the stream where to output debugging logs.
 
|-
 
|-
 
|void setRTSStatus (bool value)
 
|void setRTSStatus (bool value)
  
<nowiki>:</nowiki>Sets RTS signal status.
+
:Sets RTS signal status.
 
|-
 
|-
 
|void setTerminalType (TermType value)
 
|void setTerminalType (TermType value)
  
<nowiki>:</nowiki>Sets the terminal type to emulate.
+
:Sets the terminal type to emulate.
 
|-
 
|-
 
|SoundGenerator * soundGenerator ()
 
|SoundGenerator * soundGenerator ()
  
<nowiki>:</nowiki>Gets embedded sound generator.
+
:Gets embedded sound generator.
 
|-
 
|-
 
|TermInfo const & terminalType ()
 
|TermInfo const & terminalType ()
  
<nowiki>:</nowiki>Determines current terminal type.
+
:Determines current terminal type.
 
|-
 
|-
 
|void unRead (uint8_t c)
 
|void unRead (uint8_t c)
  
<nowiki>:</nowiki>Injects keys into the keyboard queue.
+
:Injects keys into the keyboard queue.
 
|-
 
|-
 
|bool waitFor (int value, int timeOutMS=-1)
 
|bool waitFor (int value, int timeOutMS=-1)
  
<nowiki>:</nowiki>Wait for a specific code from keyboard, discarding all previous codes.
+
:Wait for a specific code from keyboard, discarding all previous codes.
 
|-
 
|-
 
|size_t write (const uint8_t *buffer, size_t size)
 
|size_t write (const uint8_t *buffer, size_t size)
  
<nowiki>:</nowiki>Sends specified number of codes to the display.
+
:Sends specified number of codes to the display.
 
|-
 
|-
 
|size_t write (uint8_t c)
 
|size_t write (uint8_t c)
  
<nowiki>:</nowiki>Sends a single code to the display.
+
:Sends a single code to the display.
 
|-
 
|-
 
|bool XOFFStatus ()
 
|bool XOFFStatus ()
  
<nowiki>:</nowiki>Reports whether TX is active.
+
:Reports whether TX is active.
 
|}
 
|}
 
  
 
==Public Attributes==
 
==Public Attributes==

2022年3月23日 (水) 11:39時点における版

class Terminal

ANSI-VT100互換のディスプレイ端末。

#include <terminal.h>

ストリームを継承します。

Public Member Functions

void activate (TerminalTransition transition=TerminalTransition::None)
Activates this terminal for input and output.
int available ()
Gets the number of codes available in the keyboard queue.
int availableForWrite ()
Determines number of codes that the display input queue can still accept.
bool begin (BaseDisplayController *displayController, int maxColumns=-1, int maxRows=-1, Keyboard *keyboard=nullptr)
Initializes the terminal.
Canvas * canvas ()
Gets associated canvas object.
void clear (bool moveCursor=true)
Clears the screen.
void connectLocally ()
Permits using of terminal locally.
void connectSerialPort (HardwareSerial &serialPort, bool autoXONXOFF=true)
Connects a remote host using the specified serial port.
void connectSerialPort (uint32_t baud, uint32_t config, int rxPin, int txPin, FlowControl flowControl, bool inverted=false, int rtsPin=-1, int ctsPin=-1)
Connects a remote host using UART.
bool CTSStatus ()
Reports current CTS signal status.
void deactivate ()
Deactivates this terminal.
void disableSerialPortRX (bool value)
Disables/Enables serial port RX.
void disconnectLocally ()
Avoids using of terminal locally.
void enableCursor (bool value)
Enables or disables cursor.
void end ()
Finalizes the terminal.
void flowControl (bool enableRX)
Allows/disallows host to send data.
bool flowControl ()
Checks whether host can receive data.
void flush (bool waitVSync)
Waits for all codes sent to the display has been processed.
void flush ()
Waits for all codes sent to the display has been processed.
int getColumns ()
Returns the number of columns.
int getRows ()
Returns the number of lines.
bool isActive ()
Determines if this terminal is active or not.
Keyboard * keyboard ()
Gets associated keyboard object.
void loadFont (FontInfo const *font)
Sets the font to use.
void localInsert (uint8_t c)
Injects keys into the keyboard queue.
void localWrite (uint8_t c)
Injects keys into the keyboard queue.
void localWrite (char const *str)
Injects a string of keys into the keyboard queue.
int peek ()
Reads a code from the keyboard without advancing to the next one.
void pollSerialPort ()
Pools the serial port for incoming data.
int read ()
Reads codes from keyboard.
int read (int timeOutMS)
Reads codes from keyboard specyfing timeout.
bool RTSStatus ()
Reports current RTS signal status.
void send (uint8_t c)
Like localWrite() but sends also to serial port if connected.
void send (char const *str)
Like localWrite() but sends also to serial port if connected.
void setBackgroundColor (Color color, bool setAsDefault=true)
Sets the background color.
void setColorForAttribute (CharStyle attribute, Color color, bool maintainStyle)
Selects a color for the specified attribute.
void setColorForAttribute (CharStyle attribute)
Disables color for the specified attribute.
void setForegroundColor (Color color, bool setAsDefault=true)
Sets the foreground color.
void setLogStream (Stream &stream)
Sets the stream where to output debugging logs.
void setRTSStatus (bool value)
Sets RTS signal status.
void setTerminalType (TermType value)
Sets the terminal type to emulate.
SoundGenerator * soundGenerator ()
Gets embedded sound generator.
TermInfo const & terminalType ()
Determines current terminal type.
void unRead (uint8_t c)
Injects keys into the keyboard queue.
bool waitFor (int value, int timeOutMS=-1)
Wait for a specific code from keyboard, discarding all previous codes.
size_t write (const uint8_t *buffer, size_t size)
Sends specified number of codes to the display.
size_t write (uint8_t c)
Sends a single code to the display.
bool XOFFStatus ()
Reports whether TX is active.

Public Attributes

Delegate< char const * > onUserSequence

:Delegate called whenever a new user sequence has been received.

Delegate< VirtualKey *, bool > onVirtualKey

:Delegate called whenever a new virtual key is received from keyboard.

Delegate< VirtualKeyItem * > onVirtualKeyItem

:Delegate called whenever a new virtual key is received from keyboard, including shift states.


Static Public Attributes


Detailed Description

Defines a cursor.

Example1:

Example2:

Examples:

Others/KeyboardScanCodes/KeyboardScanCodes.ino, Others/KeyboardVirtualKeys/KeyboardVirtualKeys.ino, SSD1306_OLED/128x32/SimpleTerminalOut/SimpleTerminalOut.ino, SSD1306_OLED/128x64/NetworkTerminal/NetworkTerminal.ino, SSD1306_OLED/128x64/RTClock/RTClock.ino, SSD1306_OLED/128x64/SimpleTerminalOut/SimpleTerminalOut.ino, ST7789_TFT/240x240/SimpleTerminalOut/SimpleTerminalOut.ino, VGA/Altair8800/Altair8800.ino, VGA/AnsiTerminal/AnsiTerminal.ino, VGA/LoopbackTerminal/LoopbackTerminal.ino, VGA/MultitaskingCPM/MultitaskingCPM.ino, VGA/NetworkTerminal/NetworkTerminal.ino, VGA/SimpleTerminalOut/SimpleTerminalOut.ino, VGA/SimpleTextTerminalOut/SimpleTextTerminalOut.ino, and VGA/Songs/Songs.ino.

Definition at line 953 of file terminal.h.



The documentation for this struct was generated from the following file:

  • terminal.h
  • terminal.cpp



戻る