Web技術なぁ…
標準的な技術が存在
HTML5, Flash, Silverlight... (知らんけど)
ハード/ソフトとも要求が高い
有線 or 無線のネットワークI/F
TCP/IP, HTTPをしゃべる
SerialScreenプロトコル
STX ETX Com Parameter
アスキー形式の電文
0x02 0x03 1byte 可変長
数値は16進表記
シリアル通信
ハンドシェイクは無し
Data 8bit, Non-Parity, Stop 1bit
Baud Rate: 9600/19200/38400/57600/115200
フロー制御無し 信号線はRxD/TxDのみ
SerialScreen API
drawLine 直線を描く
drawRectangle 長方形を描く
fillRectangle 長方形を塗る
drawPolygon 多角形を描く
fillPolygon 多角形を塗る
drawCircle 円を描く
fillCircle 円を塗る
drawPie 扇形を描く
fillPie 扇形を塗る
setScreen 画面サイズ設定
clearScreen 画面消去
setColor 色/線幅 設定
setFont 文字サイズ設定
drawString 文字列を描く
loadImage 画像読み込み
drawImage 画像を描く
redraw 画面の再描画
SerialScreenライブラリ
C++による実装 SerialScreen
- m_serialPort
- m_command[ ]
+ open( port, baud )
+ close( )
+ isOpen( )
+ setScreen(w, h)
+ cleanScreen( color )
+ setColor( color, width )
+ drawLine(x1, y1, x2, y2)
+ drawRectangle(x, y, w, h)
+ fillRectangle(x, y, w, h)
+ drawPolygon(num, *points )
+ fillPolygon(num, *points )
+ drawCircle(x, y, w, h)
+ fillCircle(x, y, w, h)
+ drawPie(x, y, w, h, start, weep)
+ fillPie(x, y, w, h, start, sweep)
+ setFont(size)
+ drawString(x, y, s)
+ drawImage(x, y, index)
+ loadImage(index, path)
+ redraw()
SerialScreenライブラリ
SerialPortクラス→マイコンごとに実装
SerialPort
- ( ハードウェア依存)
+ open( port, baud )
+ close( )
+ isOpen( )
+ write( *buff, len )
+ read( *buff, len )
+ getError( )