66f444e714128c5f8f61ab4d779b2e049ae6e7b1
* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: module.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named 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.
* The above named 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 for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
* Copyright 2004 by Sun Microsystems, Inc.
#include "dev_registry.h"
// interface to any module
#define MODULE_INTERFACE "Module"
#define HERE _here(__FILE__, __LINE__)
// base class for all modules
void debug_err(const char *, ...);
void debug_info(const char *, ...);
void debug_more(const char *, ...);
static const uint8_t PHYSIO_BYTEMASK_ALL
= 0xff;
devRegistry
** mySamDevPtr
;
const char *instance_name
;
mmi_instance_t
getInstance() { return instance
; };
const char *getName() { return instance_name
; };
const char *get_mod_name() { return modname
; };
const char *_here(const char *, int);
Module(const char *modname
, const char *instance_name
);
public: // to be supplied by the subclass
static Module
*create(const char *modname
, const char *instance_name
);
static const char *get_help_string();
virtual const char *get_help();
virtual const char *get_version();
virtual bool parse_arg(const char *);
virtual bool check_args();
virtual void init_done();
virtual void module_added(mmi_instance_t
, const char*);
virtual void module_deleted(mmi_instance_t
, const char*);
virtual void *get_interface(const char*);
virtual bool dump(FILE *fp
);
virtual bool restore(FILE *fp
);
virtual void get_dev_props();
extern "C" static void module_create_instance(const char *modname
, const char *instance_name
);
#endif /* _BLAZE_MODULE_H */