Hogwarts Wand Docs: ../server/wandio.h

Wand Sourcecode: ../server/wandio.h

//
// wandio.h - functons for handling wand
//
// Copyright (C) 2006  Nathan (Acorn) Pooley
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// version 2 as published by the Free Software Foundation.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License (gpl.txt) for more details. 
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
// 
// You can contact the author, Nathan (Acorn) Pooley, by writing
// to Nathan (Acorn) Pooley, 949 Buckeye Drive, Sunnyvale, CA  94086, USA
// or through the form at http://www.rawbw.com/~acorn/wand/feedback.html
//
#ifndef WANDIO_H
#define WANDIO_H

//#@DOC@ functions for communicating with the wand (over serial port)

//###########################################################################
//############################### NOTES #####################################
//###########################################################################
//
//  H   H   OOO   W   W        TTTTT   OOO        U   U   SSSS  EEEE
//  H   H  O   O  W W W          T    O   O       U   U  S      E
//  HHHHH  O   O  W W W          T    O   O       U   U   SSS   EEE
//  H   H  O   O  WWWWW          T    O   O       U   U      S  E
//  H   H   OOO    W W           T     OOO         UUU   SSSS   EEEEE
//
//

//###########################################################################
//############################### TYPEDEFS ##################################
//###########################################################################

typedef struct WandInfoRec WandInfo;
struct AcFdGroupRec;
typedef void (*WandOutFunction)(void *data, const char *str);

//###########################################################################
//############################### PROTOTYPES ################################
//###########################################################################

WandInfo *WandInit(void);
void WandShutdown(WandInfo *wi);
void WandRecover(WandInfo *wi);
int  WandRecoverWait(WandInfo *wi);

int WandDebugLevel(WandInfo *wi, int debugLevel);
void WandQuiet(WandInfo *wi);
void WandUnQuiet(WandInfo *wi) ;


int WandGetFd(WandInfo *wi);
int WandCmdf(WandInfo *wi, const char *fmt, ...);
char *WandCmdfStr(WandInfo *wi, const char *fmt, ...);
int   WandHandleSerial(int fd, void *data);

void WandOutCallback(WandInfo *wi,
                    WandOutFunction func,
                    void            *data);

void WandPrompt(WandInfo *wi);
int  WandPromptWaitUsec(WandInfo *wi, unsigned long usec);

char *WandGetPrompt(WandInfo *wi);
int WandHalt(WandInfo *wi);
int WandIsRunning(WandInfo *wi);


#endif // WANDIO_H

This file Copyright (C) 2006 by Nathan (Acorn) Pooley
Go to TOP Wand page
Go to Acorn's personal webpage
Go to Hogwarts website: www.gotohogwarts.com
Snout: www.snout.org/game
Gadgets of Justice Unlimited
Snout GC (Wiki)
Snout Wiki
File created by do_doc at Wed May 30 03:30:24 PDT 2007