mirror of
https://github.com/wfjm/w11.git
synced 2026-02-15 12:36:34 +00:00
- interim release w11a_V0.57 (untagged)
- new C++ and Tcl based backend server supports now RK11 handling - w11a systems operate with rlink over USB on nexsy2 and nexsy3 boards. See w11a_os_guide.txt for details
This commit is contained in:
@@ -28,7 +28,9 @@ OBJ_all += RtclRw11Cpu.o RtclRw11CpuW11a.o
|
||||
OBJ_all += RtclRw11Cntl.o RtclRw11CntlFactory.o
|
||||
OBJ_all += RtclRw11Unit.o
|
||||
OBJ_all += RtclRw11UnitTerm.o
|
||||
OBJ_all += RtclRw11UnitDisk.o
|
||||
OBJ_all += RtclRw11CntlDL11.o RtclRw11UnitDL11.o
|
||||
OBJ_all += RtclRw11CntlRK11.o RtclRw11UnitRK11.o
|
||||
#
|
||||
DEP_all = $(OBJ_all:.o=.dep)
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RtclRw11CntlFactory.cpp 495 2013-03-06 17:13:48Z mueller $
|
||||
// $Id: RtclRw11CntlFactory.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlFactory.cpp 495 2013-03-06 17:13:48Z mueller $
|
||||
\version $Id: RtclRw11CntlFactory.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\brief Implemenation of global function RtclRw11CntlFactory.
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "RtclRw11CntlFactory.hpp"
|
||||
|
||||
#include "RtclRw11CntlDL11.hpp"
|
||||
//#include "RtclRw11CntlRK11.hpp"
|
||||
#include "RtclRw11CntlRK11.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -49,10 +49,10 @@ int RtclRw11CntlFactory(RtclArgs& args, RtclRw11Cpu& cpu)
|
||||
if(pobj->FactoryCmdConfig(args, cpu) != TCL_OK) return TCL_ERROR;
|
||||
pobj.release();
|
||||
|
||||
// } else if (type == "rk11") { // rk11 --------------------------
|
||||
// unique_ptr<RtclRw11CntlRK11> pobj(new RtclRw11CntlRK11());
|
||||
// if(pobj->FactoryCmdConfig(args, cpu) != TCL_OK) return TCL_ERROR;
|
||||
// pobj.release();
|
||||
} else if (type == "rk11") { // rk11 --------------------------
|
||||
unique_ptr<RtclRw11CntlRK11> pobj(new RtclRw11CntlRK11());
|
||||
if(pobj->FactoryCmdConfig(args, cpu) != TCL_OK) return TCL_ERROR;
|
||||
pobj.release();
|
||||
|
||||
} else { // unknown cntl type -------------
|
||||
return args.Quit(string("-E: unknown controller type '") + type + "'");
|
||||
|
||||
94
tools/src/librwxxtpp/RtclRw11CntlRK11.cpp
Normal file
94
tools/src/librwxxtpp/RtclRw11CntlRK11.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
// $Id: RtclRw11CntlRK11.cpp 509 2013-04-21 20:46:20Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// 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
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-02 480 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRK11.cpp 509 2013-04-21 20:46:20Z mueller $
|
||||
\brief Implemenation of RtclRw11CntlRK11.
|
||||
*/
|
||||
|
||||
#include "librtcltools/RtclNameSet.hpp"
|
||||
|
||||
#include "RtclRw11CntlRK11.hpp"
|
||||
#include "RtclRw11UnitRK11.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11CntlRK11
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
RtclRw11CntlRK11::RtclRw11CntlRK11()
|
||||
: RtclRw11CntlBase<Rw11CntlRK11>("Rw11CntlRK11")
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
RtclRw11CntlRK11::~RtclRw11CntlRK11()
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
int RtclRw11CntlRK11::FactoryCmdConfig(RtclArgs& args, RtclRw11Cpu& cpu)
|
||||
{
|
||||
static RtclNameSet optset("-base|-lam");
|
||||
|
||||
string cntlname(cpu.Obj().NextCntlName("rk"));
|
||||
string cntlcmd = cpu.CommandName() + cntlname;
|
||||
|
||||
uint16_t base = Rw11CntlRK11::kIbaddr;
|
||||
int lam = Rw11CntlRK11::kLam;
|
||||
|
||||
string opt;
|
||||
while (args.NextOpt(opt, optset)) {
|
||||
if (opt == "-base") {
|
||||
if (!args.GetArg("base", base, 0177776, 0160000)) return kERR;
|
||||
} else if (opt == "-lam") {
|
||||
if (!args.GetArg("lam", lam, 0, 15)) return kERR;
|
||||
}
|
||||
}
|
||||
if (!args.AllDone()) return kERR;
|
||||
|
||||
// configure controller
|
||||
Obj().Config(cntlname, base, lam);
|
||||
|
||||
// install in CPU
|
||||
cpu.Obj().AddCntl(dynamic_pointer_cast<Rw11Cntl>(ObjSPtr()));
|
||||
// finally create tcl command
|
||||
CreateObjectCmd(args.Interp(), cntlcmd.c_str());
|
||||
|
||||
// and create unit commands
|
||||
for (size_t i=0; i<Obj().NUnit(); i++) {
|
||||
string unitcmd = cpu.CommandName() + Obj().UnitName(i);
|
||||
new RtclRw11UnitRK11(args.Interp(), unitcmd, Obj().UnitSPtr(i));
|
||||
}
|
||||
|
||||
return kOK;
|
||||
}
|
||||
|
||||
} // end namespace Retro
|
||||
47
tools/src/librwxxtpp/RtclRw11CntlRK11.hpp
Normal file
47
tools/src/librwxxtpp/RtclRw11CntlRK11.hpp
Normal file
@@ -0,0 +1,47 @@
|
||||
// $Id: RtclRw11CntlRK11.hpp 509 2013-04-21 20:46:20Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// 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
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-03-06 495 1.0 Initial version
|
||||
// 2013-02-08 484 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11CntlRK11.hpp 509 2013-04-21 20:46:20Z mueller $
|
||||
\brief Declaration of class RtclRw11CntlRK11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11CntlRK11
|
||||
#define included_Retro_RtclRw11CntlRK11 1
|
||||
|
||||
#include "RtclRw11CntlBase.hpp"
|
||||
#include "librw11/Rw11CntlRK11.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11CntlRK11 : public RtclRw11CntlBase<Rw11CntlRK11> {
|
||||
public:
|
||||
RtclRw11CntlRK11();
|
||||
~RtclRw11CntlRK11();
|
||||
|
||||
virtual int FactoryCmdConfig(RtclArgs& args, RtclRw11Cpu& cpu);
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
//#include "RtclRw11CntlRK11.ipp"
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RtclRw11Cpu.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
// $Id: RtclRw11Cpu.cpp 511 2013-04-27 13:51:46Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,13 +13,14 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-04-26 511 1.0.1 add M_show
|
||||
// 2013-04-02 502 1.0 Initial version
|
||||
// 2013-02-02 480 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11Cpu.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\version $Id: RtclRw11Cpu.cpp 511 2013-04-27 13:51:46Z mueller $
|
||||
\brief Implemenation of RtclRw11Cpu.
|
||||
*/
|
||||
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "boost/bind.hpp"
|
||||
#include "boost/thread/locks.hpp"
|
||||
|
||||
#include "librtools/RerrMsg.hpp"
|
||||
#include "librtools/RlogMsg.hpp"
|
||||
@@ -81,6 +83,7 @@ RtclRw11Cpu::RtclRw11Cpu(const std::string& type)
|
||||
AddMeth("get", boost::bind(&RtclRw11Cpu::M_get, this, _1));
|
||||
AddMeth("set", boost::bind(&RtclRw11Cpu::M_set, this, _1));
|
||||
AddMeth("stats", boost::bind(&RtclRw11Cpu::M_stats, this, _1));
|
||||
AddMeth("show", boost::bind(&RtclRw11Cpu::M_show, this, _1));
|
||||
AddMeth("dump", boost::bind(&RtclRw11Cpu::M_dump, this, _1));
|
||||
AddMeth("$default", boost::bind(&RtclRw11Cpu::M_default, this, _1));
|
||||
}
|
||||
@@ -818,6 +821,166 @@ int RtclRw11Cpu::M_set(RtclArgs& args)
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
int RtclRw11Cpu::M_show(RtclArgs& args)
|
||||
{
|
||||
static RtclNameSet optset("-pcps|-r0r5|-mmu|-ubmap"
|
||||
);
|
||||
|
||||
string opt;
|
||||
uint16_t base = Obj().Base();
|
||||
ostringstream sos;
|
||||
RerrMsg emsg;
|
||||
|
||||
const char* mode[4] = {"k","s","?","u"};
|
||||
const char* rust[16] = {"init", "HALTed", "reset", "stopped",
|
||||
"stepped", "suspend", "0110", "..run..",
|
||||
"F:vecfet", "F:redstk", "1010", "1011",
|
||||
"F:seq", "F:vmbox" , "1101", "1111"};
|
||||
|
||||
while (args.NextOpt(opt, optset)) {
|
||||
if (opt == "-pcps") {
|
||||
RlinkCommandList clist;
|
||||
size_t i_pc = clist.AddRreg(base + Rw11Cpu::kCp_addr_pc);
|
||||
size_t i_sp = clist.AddRreg(base + Rw11Cpu::kCp_addr_r0+6);
|
||||
size_t i_psw = clist.AddRreg(base + Rw11Cpu::kCp_addr_psw);
|
||||
size_t i_stat = clist.AddRreg(base + Rw11Cpu::kCp_addr_stat);
|
||||
if (!Server().Exec(clist, emsg)) return args.Quit(emsg);
|
||||
uint16_t psw = clist[i_psw].Data();
|
||||
uint16_t stat = clist[i_stat].Data();
|
||||
uint16_t psw_cm = (psw>>14) & 003;
|
||||
uint16_t psw_pm = (psw>>12) & 003;
|
||||
uint16_t psw_set = (psw>>11) & 001;
|
||||
uint16_t psw_pri = (psw>>5) & 007;
|
||||
uint16_t psw_tbit = (psw>>4) & 001;
|
||||
uint16_t psw_nzvc = (psw) & 017;
|
||||
uint16_t stat_rust = (stat>>4) & 017;
|
||||
sos << "PC=" << RosPrintBvi(clist[i_pc].Data(),8)
|
||||
<< " SP=" << RosPrintBvi(clist[i_sp].Data(),8)
|
||||
<< " PS=" << RosPrintBvi(psw,8)
|
||||
<< " cm,pm=" << mode[psw_cm] << "," << mode[psw_pm]
|
||||
<< " s,p,t=" << psw_set << "," << psw_pri << "," << psw_tbit
|
||||
<< " NZVC=" << RosPrintBvi(psw_nzvc,2,4)
|
||||
<< " rust=" << RosPrintBvi(stat_rust,8,4) << " " << rust[stat_rust]
|
||||
<< endl;
|
||||
|
||||
} else if (opt == "-r0r5") {
|
||||
RlinkCommandList clist;
|
||||
for (size_t i=0; i<6; i++) clist.AddRreg(base + Rw11Cpu::kCp_addr_r0+i);
|
||||
if (!Server().Exec(clist, emsg)) return args.Quit(emsg);
|
||||
sos << "R0-R5:";
|
||||
for (size_t i=0; i<6; i++) sos << " " << RosPrintBvi(clist[i].Data(),8);
|
||||
sos << endl;
|
||||
|
||||
} else if (opt == "-mmu") {
|
||||
uint16_t mmr[4];
|
||||
uint16_t asr[3][32];
|
||||
const char* pmode[3] = {"km","sm","um"};
|
||||
const char* acf[8] = {"nres ",
|
||||
"r -r ",
|
||||
"r ",
|
||||
"011 ",
|
||||
"rw-rw",
|
||||
"rw- w",
|
||||
"rw ",
|
||||
"111 "};
|
||||
{
|
||||
boost::lock_guard<RlinkConnect> lock(Connect());
|
||||
RlinkCommandList clist;
|
||||
clist.AddWreg(base + Rw11Cpu::kCp_addr_al, 0177572);
|
||||
clist.AddRblk(base + Rw11Cpu::kCp_addr_memi, mmr, 3);
|
||||
clist.AddWreg(base + Rw11Cpu::kCp_addr_al, 0172516);
|
||||
clist.AddRblk(base + Rw11Cpu::kCp_addr_memi, mmr+3, 1);
|
||||
if (!Server().Exec(clist, emsg)) return args.Quit(emsg);
|
||||
clist.Clear();
|
||||
clist.AddWreg(base + Rw11Cpu::kCp_addr_al, 0172300);
|
||||
clist.AddRblk(base + Rw11Cpu::kCp_addr_memi, asr[0], 32);
|
||||
clist.AddWreg(base + Rw11Cpu::kCp_addr_al, 0172200);
|
||||
clist.AddRblk(base + Rw11Cpu::kCp_addr_memi, asr[1], 32);
|
||||
clist.AddWreg(base + Rw11Cpu::kCp_addr_al, 0177600);
|
||||
clist.AddRblk(base + Rw11Cpu::kCp_addr_memi, asr[2], 32);
|
||||
if (!Server().Exec(clist, emsg)) return args.Quit(emsg);
|
||||
}
|
||||
uint16_t mmr1_0_reg = (mmr[1] ) & 07;
|
||||
int16_t mmr1_0_val = (mmr[1]>> 3) & 37;
|
||||
uint16_t mmr1_1_reg = (mmr[1]>> 8) & 07;
|
||||
int16_t mmr1_1_val = (mmr[1]>>11) & 37;
|
||||
uint16_t mmr3_ubmap = (mmr[3]>> 5) & 01;
|
||||
uint16_t mmr3_22bit = (mmr[3]>> 4) & 01;
|
||||
uint16_t mmr3_d_km = (mmr[3]>> 2) & 01;
|
||||
uint16_t mmr3_d_sm = (mmr[3]>> 1) & 01;
|
||||
uint16_t mmr3_d_um = (mmr[3] ) & 01;
|
||||
sos << "mmu:" << endl;
|
||||
sos << "mmr0=" << RosPrintBvi(mmr[0],8) << endl;
|
||||
if (mmr1_0_val & 020) mmr1_0_val |= 0177740;
|
||||
if (mmr1_1_val & 020) mmr1_1_val |= 0177740;
|
||||
sos << "mmr1=" << RosPrintBvi(mmr[1],8);
|
||||
if (mmr1_0_val) sos << " r" << mmr1_0_reg
|
||||
<< ":" << RosPrintf(mmr1_0_val,"d",3);
|
||||
if (mmr1_1_val) sos << " r" << mmr1_1_reg
|
||||
<< ":" << RosPrintf(mmr1_1_val,"d",3);
|
||||
sos << endl;
|
||||
sos << "mmr2=" << RosPrintBvi(mmr[2],8) << endl;
|
||||
sos << "mmr3=" << RosPrintBvi(mmr[3],8)
|
||||
<< " ubmap=" << mmr3_ubmap
|
||||
<< " 22bit=" << mmr3_22bit
|
||||
<< " d-space k,s,u=" << mmr3_d_km
|
||||
<< "," << mmr3_d_sm << "," << mmr3_d_um << endl;
|
||||
for (size_t m=0; m<3; m++) {
|
||||
sos << pmode[m] << " "
|
||||
<< " I pdr slf aw d acf I par"
|
||||
<< " "
|
||||
<< " D pdr slf aw d acf D par" << endl;
|
||||
for (size_t i=0; i<=7; i++) {
|
||||
sos << " " << i << " ";
|
||||
for (size_t s=0; s<=1; s++) {
|
||||
if (s!=0) sos << " ";
|
||||
uint16_t pdr = asr[m][i +8*s];
|
||||
uint16_t par = asr[m][i+16+8*s];
|
||||
uint16_t pdr_slf = (pdr>>8) & 0177;
|
||||
uint16_t pdr_a = (pdr>>7) & 01;
|
||||
uint16_t pdr_w = (pdr>>6) & 01;
|
||||
uint16_t pdr_e = (pdr>>3) & 01;
|
||||
uint16_t pdr_acf = (pdr) & 07;
|
||||
sos<< RosPrintBvi(pdr,8)
|
||||
<< " " << RosPrintf(pdr_slf,"d",3)
|
||||
<< " " << pdr_a << pdr_w
|
||||
<< " " << (pdr_e ? "d" : "u")
|
||||
<< " " << acf[pdr_acf]
|
||||
<< " " << RosPrintBvi(par,8);
|
||||
}
|
||||
sos << endl;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (opt == "-ubmap") {
|
||||
uint16_t ubmap[64];
|
||||
RlinkCommandList clist;
|
||||
clist.AddWreg(base + Rw11Cpu::kCp_addr_al, 0170200);
|
||||
clist.AddRblk(base + Rw11Cpu::kCp_addr_memi, ubmap, 64);
|
||||
if (!Server().Exec(clist, emsg)) return args.Quit(emsg);
|
||||
sos << "unibus map:" << endl;
|
||||
for (size_t i = 0; i<=7; i++) {
|
||||
for (size_t j = 0; j <= 030; j+=010) {
|
||||
size_t k = 2*(i+j);
|
||||
uint32_t data = uint32_t(ubmap[k]) | (uint32_t(ubmap[k+1]))<<16;
|
||||
if (j!=0) sos << " ";
|
||||
sos << RosPrintBvi(j+i,8,5) << " "
|
||||
<< RosPrintBvi(data,8,22);
|
||||
}
|
||||
sos << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!args.AllDone()) return kERR;
|
||||
args.SetResult(sos);
|
||||
|
||||
return kOK;
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
int RtclRw11Cpu::M_stats(RtclArgs& args)
|
||||
{
|
||||
RtclStats::Context cntx;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RtclRw11Cpu.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
// $Id: RtclRw11Cpu.hpp 511 2013-04-27 13:51:46Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-04-26 511 1.0.1 add M_show
|
||||
// 2013-04-02 502 1.0 Initial version
|
||||
// 2013-02-02 480 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11Cpu.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\version $Id: RtclRw11Cpu.hpp 511 2013-04-27 13:51:46Z mueller $
|
||||
\brief Declaration of class RtclRw11Cpu.
|
||||
*/
|
||||
|
||||
@@ -60,6 +61,7 @@ namespace Retro {
|
||||
int M_boot(RtclArgs& args);
|
||||
int M_get(RtclArgs& args);
|
||||
int M_set(RtclArgs& args);
|
||||
int M_show(RtclArgs& args);
|
||||
int M_stats(RtclArgs& args);
|
||||
int M_dump(RtclArgs& args);
|
||||
int M_default(RtclArgs& args);
|
||||
|
||||
73
tools/src/librwxxtpp/RtclRw11UnitDisk.cpp
Normal file
73
tools/src/librwxxtpp/RtclRw11UnitDisk.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
// $Id: RtclRw11UnitDisk.cpp 509 2013-04-21 20:46:20Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// 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
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-04-19 507 1.0 Initial version
|
||||
// 2013-02-22 490 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11UnitDisk.cpp 509 2013-04-21 20:46:20Z mueller $
|
||||
\brief Implemenation of RtclRw11UnitDisk.
|
||||
*/
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "RtclRw11UnitDisk.hpp"
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11UnitDisk
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
RtclRw11UnitDisk::RtclRw11UnitDisk(RtclRw11Unit* ptcl, Rw11UnitDisk* pobj)
|
||||
: fpTcl(ptcl),
|
||||
fpObj(pobj)
|
||||
{
|
||||
RtclGetList& gets = ptcl->GetList();
|
||||
RtclSetList& sets = ptcl->SetList();
|
||||
gets.Add<const string&> ("type",
|
||||
boost::bind(&Rw11UnitDisk::Type, pobj));
|
||||
gets.Add<size_t> ("ncylinder",
|
||||
boost::bind(&Rw11UnitDisk::NCylinder, pobj));
|
||||
gets.Add<size_t> ("nhead",
|
||||
boost::bind(&Rw11UnitDisk::NHead, pobj));
|
||||
gets.Add<size_t> ("nsector",
|
||||
boost::bind(&Rw11UnitDisk::NSector, pobj));
|
||||
gets.Add<size_t> ("blocksize",
|
||||
boost::bind(&Rw11UnitDisk::BlockSize, pobj));
|
||||
gets.Add<size_t> ("nblock",
|
||||
boost::bind(&Rw11UnitDisk::NBlock, pobj));
|
||||
gets.Add<bool> ("wprot",
|
||||
boost::bind(&Rw11UnitDisk::WProt, pobj));
|
||||
|
||||
sets.Add<const string&> ("type",
|
||||
boost::bind(&Rw11UnitDisk::SetType,pobj, _1));
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
RtclRw11UnitDisk::~RtclRw11UnitDisk()
|
||||
{}
|
||||
|
||||
|
||||
} // end namespace Retro
|
||||
52
tools/src/librwxxtpp/RtclRw11UnitDisk.hpp
Normal file
52
tools/src/librwxxtpp/RtclRw11UnitDisk.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
// $Id: RtclRw11UnitDisk.hpp 509 2013-04-21 20:46:20Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// 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
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-04-19 507 1.0 Initial version
|
||||
// 2013-02-22 490 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11UnitDisk.hpp 509 2013-04-21 20:46:20Z mueller $
|
||||
\brief Declaration of class RtclRw11UnitDisk.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11UnitDisk
|
||||
#define included_Retro_RtclRw11UnitDisk 1
|
||||
|
||||
#include "librw11/Rw11UnitDisk.hpp"
|
||||
|
||||
#include "RtclRw11Unit.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11UnitDisk {
|
||||
public:
|
||||
RtclRw11UnitDisk(RtclRw11Unit* ptcl, Rw11UnitDisk* pobj);
|
||||
~RtclRw11UnitDisk();
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
RtclRw11Unit* fpTcl;
|
||||
Rw11UnitDisk* fpObj;
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
//#include "RtclRw11UnitDisk.ipp"
|
||||
|
||||
#endif
|
||||
56
tools/src/librwxxtpp/RtclRw11UnitRK11.cpp
Normal file
56
tools/src/librwxxtpp/RtclRw11UnitRK11.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
// $Id: RtclRw11UnitRK11.cpp 509 2013-04-21 20:46:20Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// 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
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-02-22 490 1.0 Initial version
|
||||
// 2013-02-16 488 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11UnitRK11.cpp 509 2013-04-21 20:46:20Z mueller $
|
||||
\brief Implemenation of RtclRw11UnitRK11.
|
||||
*/
|
||||
|
||||
#include "RtclRw11UnitRK11.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*!
|
||||
\class Retro::RtclRw11UnitRK11
|
||||
\brief FIXME_docs
|
||||
*/
|
||||
|
||||
// all method definitions in namespace Retro
|
||||
namespace Retro {
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Constructor
|
||||
|
||||
RtclRw11UnitRK11::RtclRw11UnitRK11(
|
||||
Tcl_Interp* interp, const std::string& unitcmd,
|
||||
const boost::shared_ptr<Rw11UnitRK11>& spunit)
|
||||
: RtclRw11UnitBase<Rw11UnitRK11>("Rw11UnitRK11", spunit),
|
||||
RtclRw11UnitDisk(this, spunit.get())
|
||||
{
|
||||
CreateObjectCmd(interp, unitcmd.c_str());
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Destructor
|
||||
|
||||
RtclRw11UnitRK11::~RtclRw11UnitRK11()
|
||||
{}
|
||||
|
||||
} // end namespace Retro
|
||||
53
tools/src/librwxxtpp/RtclRw11UnitRK11.hpp
Normal file
53
tools/src/librwxxtpp/RtclRw11UnitRK11.hpp
Normal file
@@ -0,0 +1,53 @@
|
||||
// $Id: RtclRw11UnitRK11.hpp 509 2013-04-21 20:46:20Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// 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
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-02-22 490 1.0 Initial version
|
||||
// 2013-02-16 488 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11UnitRK11.hpp 509 2013-04-21 20:46:20Z mueller $
|
||||
\brief Declaration of class RtclRw11UnitRK11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_RtclRw11UnitRK11
|
||||
#define included_Retro_RtclRw11UnitRK11 1
|
||||
|
||||
#include "librw11/Rw11UnitRK11.hpp"
|
||||
#include "librw11/Rw11CntlRK11.hpp"
|
||||
|
||||
#include "RtclRw11UnitDisk.hpp"
|
||||
#include "RtclRw11UnitBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
class RtclRw11UnitRK11 : public RtclRw11UnitBase<Rw11UnitRK11>,
|
||||
public RtclRw11UnitDisk {
|
||||
public:
|
||||
RtclRw11UnitRK11(Tcl_Interp* interp,
|
||||
const std::string& unitcmd,
|
||||
const boost::shared_ptr<Rw11UnitRK11>& spunit);
|
||||
~RtclRw11UnitRK11();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
//#include "RtclRw11UnitRK11.ipp"
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RtclRw11UnitTerm.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
// $Id: RtclRw11UnitTerm.cpp 511 2013-04-27 13:51:46Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,13 +13,14 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-04-26 511 1.0.1 add M_type
|
||||
// 2013-03-03 494 1.0 Initial version
|
||||
// 2013-03-01 493 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11UnitTerm.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\version $Id: RtclRw11UnitTerm.cpp 511 2013-04-27 13:51:46Z mueller $
|
||||
\brief Implemenation of RtclRw11UnitTerm.
|
||||
*/
|
||||
|
||||
@@ -42,16 +43,30 @@ RtclRw11UnitTerm::RtclRw11UnitTerm(RtclRw11Unit* ptcl, Rw11UnitTerm* pobj)
|
||||
: fpTcl(ptcl),
|
||||
fpObj(pobj)
|
||||
{
|
||||
ptcl->AddMeth("type", boost::bind(&RtclRw11UnitTerm::M_type, this, _1));
|
||||
|
||||
RtclGetList& gets = ptcl->GetList();
|
||||
RtclSetList& sets = ptcl->SetList();
|
||||
|
||||
gets.Add<const string&> ("channelid",
|
||||
boost::bind(&Rw11UnitTerm::ChannelId, pobj));
|
||||
gets.Add<bool> ("rcv7bit",
|
||||
boost::bind(&Rw11UnitTerm::Rcv7bit, pobj));
|
||||
gets.Add<bool> ("to7bit",
|
||||
boost::bind(&Rw11UnitTerm::To7bit, pobj));
|
||||
gets.Add<bool> ("toenpc",
|
||||
boost::bind(&Rw11UnitTerm::ToEnpc, pobj));
|
||||
gets.Add<bool> ("ti7bit",
|
||||
boost::bind(&Rw11UnitTerm::Ti7bit, pobj));
|
||||
gets.Add<const string&> ("log",
|
||||
boost::bind(&Rw11UnitTerm::Log, pobj));
|
||||
|
||||
sets.Add<bool> ("rcv7bit",
|
||||
boost::bind(&Rw11UnitTerm::SetRcv7bit,pobj, _1));
|
||||
sets.Add<bool> ("to7bit",
|
||||
boost::bind(&Rw11UnitTerm::SetTo7bit,pobj, _1));
|
||||
sets.Add<bool> ("toenpc",
|
||||
boost::bind(&Rw11UnitTerm::SetToEnpc,pobj, _1));
|
||||
sets.Add<bool> ("ti7bit",
|
||||
boost::bind(&Rw11UnitTerm::SetTi7bit,pobj, _1));
|
||||
sets.Add<const string&> ("log",
|
||||
boost::bind(&Rw11UnitTerm::SetLog,pobj, _1));
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
@@ -60,5 +75,19 @@ RtclRw11UnitTerm::RtclRw11UnitTerm(RtclRw11Unit* ptcl, Rw11UnitTerm* pobj)
|
||||
RtclRw11UnitTerm::~RtclRw11UnitTerm()
|
||||
{}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
int RtclRw11UnitTerm::M_type(RtclArgs& args)
|
||||
{
|
||||
string text;
|
||||
if (!args.GetArg("text", text)) return TCL_ERROR;
|
||||
|
||||
if (!args.AllDone()) return TCL_ERROR;
|
||||
|
||||
fpObj->RcvCallback((const uint8_t*)text.data(), text.size());
|
||||
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RtclRw11UnitTerm.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
// $Id: RtclRw11UnitTerm.hpp 511 2013-04-27 13:51:46Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-04-26 511 1.0.1 add M_type
|
||||
// 2013-03-03 494 1.0 Initial version
|
||||
// 2013-03-01 493 0.1 First draft
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: RtclRw11UnitTerm.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\version $Id: RtclRw11UnitTerm.hpp 511 2013-04-27 13:51:46Z mueller $
|
||||
\brief Declaration of class RtclRw11UnitTerm.
|
||||
*/
|
||||
|
||||
@@ -39,6 +40,7 @@ namespace Retro {
|
||||
~RtclRw11UnitTerm();
|
||||
|
||||
protected:
|
||||
int M_type(RtclArgs& args);
|
||||
|
||||
protected:
|
||||
RtclRw11Unit* fpTcl;
|
||||
|
||||
Reference in New Issue
Block a user