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