diff --git a/DeviceAdapters/ASITiger/ASIPLogic.cpp b/DeviceAdapters/ASITiger/ASIPLogic.cpp index 7342575bb..a40ace638 100644 --- a/DeviceAdapters/ASITiger/ASIPLogic.cpp +++ b/DeviceAdapters/ASITiger/ASIPLogic.cpp @@ -36,23 +36,19 @@ #include #include -#define PLOGIC_NUM_ADDRESSES 128 -#define PLOGIC_INVERT_ADDRESS 64 -#define PLOGIC_FRONTPANEL_START_ADDRESS 33 -#define PLOGIC_FRONTPANEL_END_ADDRESS 40 -#define PLOGIC_FRONTPANEL_NUM (PLOGIC_FRONTPANEL_END_ADDRESS - PLOGIC_FRONTPANEL_START_ADDRESS + 1) -#define PLOGIC_BACKPLANE_START_ADDRESS 41 -#define PLOGIC_BACKPLANE_END_ADDRESS 48 -#define PLOGIC_BACKPLANE_NUM (PLOGIC_BACKPLANE_END_ADDRESS - PLOGIC_BACKPLANE_START_ADDRESS + 1) -#define PLOGIC_PHYSICAL_IO_START_ADDRESS PLOGIC_FRONTPANEL_START_ADDRESS -#define PLOGIC_PHYSICAL_IO_END_ADDRESS PLOGIC_BACKPLANE_END_ADDRESS -#define PLOGIC_PHYSICAL_IO_NUM (PLOGIC_PHYSICAL_IO_END_ADDRESS - PLOGIC_PHYSICAL_IO_START_ADDRESS + 1) - -using namespace std; - -/////////////////////////////////////////////////////////////////////////////// -// CPLogic -// +constexpr unsigned int PLOGIC_NUM_ADDRESSES = 128; +constexpr unsigned int PLOGIC_INVERT_ADDRESS = 64; +constexpr unsigned int PLOGIC_FRONTPANEL_START_ADDRESS = 33; +constexpr unsigned int PLOGIC_FRONTPANEL_END_ADDRESS = 40; +constexpr unsigned int PLOGIC_FRONTPANEL_NUM = PLOGIC_FRONTPANEL_END_ADDRESS - PLOGIC_FRONTPANEL_START_ADDRESS + 1; +constexpr unsigned int PLOGIC_BACKPLANE_START_ADDRESS = 41; +constexpr unsigned int PLOGIC_BACKPLANE_END_ADDRESS = 48; +constexpr unsigned int PLOGIC_BACKPLANE_NUM = PLOGIC_BACKPLANE_END_ADDRESS - PLOGIC_BACKPLANE_START_ADDRESS + 1; +constexpr unsigned int PLOGIC_PHYSICAL_IO_START_ADDRESS = PLOGIC_FRONTPANEL_START_ADDRESS; +constexpr unsigned int PLOGIC_PHYSICAL_IO_END_ADDRESS = PLOGIC_BACKPLANE_END_ADDRESS; +constexpr unsigned int PLOGIC_PHYSICAL_IO_NUM = PLOGIC_PHYSICAL_IO_END_ADDRESS - PLOGIC_PHYSICAL_IO_START_ADDRESS + 1; + +// ASI Tiger Programmable Logic Card CPLogic::CPLogic(const char* name) : ASIPeripheralBase< ::CShutterBase, CPLogic >(name), axisLetter_(g_EmptyAxisLetterStr), // value determined by extended name @@ -92,7 +88,7 @@ int CPLogic::Initialize() RETURN_ON_MM_ERROR( PeripheralInitialize() ); // create MM description; this doesn't work during hardware configuration wizard but will work afterwards - ostringstream command; + std::ostringstream command; command.str(""); command << g_PLogicDeviceDescription << " HexAddr=" << addressString_; CreateProperty(MM::g_Keyword_Description, command.str().c_str(), MM::String, true); @@ -103,7 +99,7 @@ int CPLogic::Initialize() char buildName[MM::MaxStrLength]; unsigned int tmp; GetProperty(g_FirmwareBuildPropertyName, buildName); - string s = buildName; + std::string s = buildName; hub_->SetLastSerialAnswer(s); int ret = hub_->ParseAnswerAfterUnderscore(tmp); if (!ret) { @@ -270,7 +266,8 @@ int CPLogic::Initialize() AddAllowedValue(g_SaveSettingsPropertyName, g_SaveSettingsOrig); AddAllowedValue(g_SaveSettingsPropertyName, g_SaveSettingsDone); - // edits cell wherever current pointer position is + // edits cell type wherever current pointer position is + // Note: also add new cell types to OnAdvancedProperties pAct = new CPropertyAction (this, &CPLogic::OnEditCellType); CreateProperty(g_EditCellTypePropertyName, g_CellTypeCode0, MM::String, false, pAct); AddAllowedValue(g_EditCellTypePropertyName, g_CellTypeCode0, 0); @@ -289,6 +286,10 @@ int CPLogic::Initialize() AddAllowedValue(g_EditCellTypePropertyName, g_CellTypeCode13, 13); AddAllowedValue(g_EditCellTypePropertyName, g_CellTypeCode14, 14); AddAllowedValue(g_EditCellTypePropertyName, g_CellTypeCode15, 15); + if (FirmwareVersionAtLeast(3.50)) { + AddAllowedValue(g_EditCellTypePropertyName, g_CellTypeCode16, 16); + AddAllowedValue(g_EditCellTypePropertyName, g_CellTypeCode17, 17); + } AddAllowedValue(g_EditCellTypePropertyName, g_IOTypeCode0, 100); AddAllowedValue(g_EditCellTypePropertyName, g_IOTypeCode1, 101); AddAllowedValue(g_EditCellTypePropertyName, g_IOTypeCode2, 102); @@ -429,7 +430,7 @@ int CPLogic::SetOpen(bool open) { if (useAs4ChShutter_ || useAs7ChShutter_) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); shutterOpen_ = open; // sets cell 8 which is "software shutter open" indicator via preset 11 (sets high) or preset 10 (sets low) if (open) { @@ -450,12 +451,13 @@ int CPLogic::GetOpen(bool& open) //////////////// // action handlers +// Modify the "PLogic Mode Table" in the header if you change this function. int CPLogic::OnPLogicMode(MM::PropertyBase* pProp, MM::ActionType eAct) { if (eAct == MM::BeforeGet) { // do nothing for now } else if (eAct == MM::AfterSet) { - string tmpstr; + std::string tmpstr; pProp->Get(tmpstr); if (tmpstr.compare(g_PLogicModediSPIMShutter) == 0) { @@ -504,9 +506,9 @@ int CPLogic::OnSetShutterChannel(MM::PropertyBase* pProp, MM::ActionType eAct) } } } else if (eAct == MM::AfterSet) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; - string tmpstr; + std::string tmpstr; RETURN_ON_MM_ERROR ( GetCurrentPropertyData(pProp->GetName().c_str(), tmp) ); if (tmp < 0) return DEVICE_OK; // no preset and other "signaling" preset codes are negative command << addressChar_ << "CCA X=" << tmp; @@ -521,7 +523,7 @@ int CPLogic::OnSetShutterChannel(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnPLogicOutputState(MM::PropertyBase* pProp, MM::ActionType eAct) { unsigned int val; - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (eAct == MM::BeforeGet || eAct == MM::AfterSet) { // always read @@ -537,7 +539,7 @@ int CPLogic::OnPLogicOutputState(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnPLogicOutputStateUpper(MM::PropertyBase* pProp, MM::ActionType eAct) { unsigned int val; - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (eAct == MM::BeforeGet || eAct == MM::AfterSet) { // always read @@ -553,7 +555,7 @@ int CPLogic::OnPLogicOutputStateUpper(MM::PropertyBase* pProp, MM::ActionType eA int CPLogic::OnFrontpanelOutputState(MM::PropertyBase* pProp, MM::ActionType eAct) { unsigned int val; - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (eAct == MM::BeforeGet || eAct == MM::AfterSet) { // always read @@ -569,7 +571,7 @@ int CPLogic::OnFrontpanelOutputState(MM::PropertyBase* pProp, MM::ActionType eAc int CPLogic::OnBackplaneOutputState(MM::PropertyBase* pProp, MM::ActionType eAct) { unsigned int val; - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (eAct == MM::BeforeGet || eAct == MM::AfterSet) { // always read @@ -584,23 +586,23 @@ int CPLogic::OnBackplaneOutputState(MM::PropertyBase* pProp, MM::ActionType eAct int CPLogic::OnTriggerSource(MM::PropertyBase* pProp, MM::ActionType eAct) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; - string tmpstr; + std::string tmpstr; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) return DEVICE_OK; command << "PM " << axisLetter_ << "?"; RETURN_ON_MM_ERROR ( hub_->QueryCommandVerify(command.str(), axisLetter_) ); RETURN_ON_MM_ERROR ( hub_->ParseAnswerAfterEquals(tmp) ); - bool success = 0; + bool success = false; switch (tmp) { case 0: success = pProp->Set(g_TriggerSourceCode0); break; case 1: success = pProp->Set(g_TriggerSourceCode1); break; case 2: success = pProp->Set(g_TriggerSourceCode2); break; case 3: success = pProp->Set(g_TriggerSourceCode3); break; case 4: success = pProp->Set(g_TriggerSourceCode4); break; - default: success=0; + default: break; } if (!success) return DEVICE_INVALID_PROPERTY_VALUE; @@ -615,7 +617,7 @@ int CPLogic::OnTriggerSource(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnPointerPosition(MM::PropertyBase* pProp, MM::ActionType eAct) { static bool justSet = false; - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_ && !justSet) @@ -640,8 +642,8 @@ int CPLogic::OnPointerPosition(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnSaveCardSettings(MM::PropertyBase* pProp, MM::ActionType eAct) { - string tmpstr; - ostringstream command; command.str(""); + std::string tmpstr; + std::ostringstream command; command.str(""); if (eAct == MM::AfterSet) { command << addressChar_ << "SS "; pProp->Get(tmpstr); @@ -663,7 +665,7 @@ int CPLogic::OnSaveCardSettings(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnRefreshProperties(MM::PropertyBase* pProp, MM::ActionType eAct) { - string tmpstr; + std::string tmpstr; if (eAct == MM::AfterSet) { pProp->Get(tmpstr); if (tmpstr.compare(g_YesState) == 0) @@ -710,7 +712,7 @@ int CPLogic::RefreshEditCellPropertyValues() int CPLogic::OnEditCellType(MM::PropertyBase* pProp, MM::ActionType eAct) { // NB: works for I/O addresses but will have incorrect strings - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if(currentPosition_ <= numCells_ // normal cells || (currentPosition_ >= PLOGIC_FRONTPANEL_START_ADDRESS && currentPosition_ <= PLOGIC_BACKPLANE_END_ADDRESS)) { // or I/O addresses if (eAct == MM::BeforeGet) { @@ -778,7 +780,7 @@ int CPLogic::OnEditCellInput4(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnEditCellUpdates(MM::PropertyBase* pProp, MM::ActionType eAct) { - string tmpstr; + std::string tmpstr; if (eAct == MM::AfterSet) { pProp->Get(tmpstr); if (tmpstr.compare(g_YesState) == 0) @@ -789,17 +791,17 @@ int CPLogic::OnEditCellUpdates(MM::PropertyBase* pProp, MM::ActionType eAct) return DEVICE_OK; } -int CPLogic::GetCellPropertyName(long index, string suffix, char* name) +int CPLogic::GetCellPropertyName(long index, const std::string& suffix, char* name) { - ostringstream os; - os << "PCell_" << setw(2) << setfill('0') << index << suffix; + std::ostringstream os; + os << "PCell_" << std::setw(2) << std::setfill('0') << index << suffix; CDeviceUtils::CopyLimitedString(name, os.str().c_str()); return DEVICE_OK; } -int CPLogic::GetIOPropertyName(long index, string suffix, char* name) +int CPLogic::GetIOPropertyName(long index, const std::string& suffix, char* name) { - ostringstream os; + std::ostringstream os; if (index < PLOGIC_BACKPLANE_START_ADDRESS) { // front panel os << "IOFrontpanel_" << index - PLOGIC_FRONTPANEL_START_ADDRESS + 1; } else { // backplane @@ -817,7 +819,7 @@ int CPLogic::OnAdvancedProperties(MM::PropertyBase* pProp, MM::ActionType eAct) return DEVICE_OK; // do nothing } else if (eAct == MM::AfterSet) { - string tmpstr; + std::string tmpstr; pProp->Get(tmpstr); if ((tmpstr.compare(g_YesState) == 0) && !advancedPropsEnabled_) // after creating advanced properties once no need to repeat { @@ -834,8 +836,7 @@ int CPLogic::OnAdvancedProperties(MM::PropertyBase* pProp, MM::ActionType eAct) GetProperty(g_RefreshPropValsPropertyName, refreshPropValsStr); SetProperty(g_RefreshPropValsPropertyName, g_YesState); - for (long i=1; i<=(long)numCells_; i++) { - + for (long i = 1; i <= (long)numCells_; i++) { // logic cell type GetCellPropertyName(i, "_CellType", propName); pActEx = new CPropertyActionEx (this, &CPLogic::OnCellType, i); @@ -856,6 +857,10 @@ int CPLogic::OnAdvancedProperties(MM::PropertyBase* pProp, MM::ActionType eAct) AddAllowedValue(propName, g_CellTypeCode13, 13); AddAllowedValue(propName, g_CellTypeCode14, 14); AddAllowedValue(propName, g_CellTypeCode15, 15); + if (FirmwareVersionAtLeast(3.50)) { + AddAllowedValue(propName, g_CellTypeCode16, 16); + AddAllowedValue(propName, g_CellTypeCode17, 17); + } UpdateProperty(propName); // logic cell CCA Z code @@ -887,10 +892,9 @@ int CPLogic::OnAdvancedProperties(MM::PropertyBase* pProp, MM::ActionType eAct) pActEx = new CPropertyActionEx (this, &CPLogic::OnInput4, i); CreateProperty(propName, "0", MM::Integer, false, pActEx); UpdateProperty(propName); - } - for (long i=PLOGIC_FRONTPANEL_START_ADDRESS; i<=PLOGIC_BACKPLANE_END_ADDRESS; i++) { + for (long i = PLOGIC_FRONTPANEL_START_ADDRESS; i <= (long)PLOGIC_BACKPLANE_END_ADDRESS; i++) { GetIOPropertyName(i, "_IOType", propName); pActEx = new CPropertyActionEx (this, &CPLogic::OnIOType, i); CreateProperty(propName, "0", MM::String, false, pActEx); @@ -945,7 +949,7 @@ int CPLogic::RefreshAdvancedCellPropertyValues(long index) // don't bother updating things like if the user changes position from the property int CPLogic::SetPositionDirectly(unsigned int position) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (position == currentPosition_) return DEVICE_OK; command << "M " << axisLetter_ << "=" << position; @@ -956,7 +960,7 @@ int CPLogic::SetPositionDirectly(unsigned int position) int CPLogic::RefreshCurrentPosition() { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); unsigned int tmp; command << "W " << axisLetter_; RETURN_ON_MM_ERROR ( hub_->QueryCommandVerify(command.str(),":A") ); @@ -967,9 +971,9 @@ int CPLogic::RefreshCurrentPosition() int CPLogic::OnCellType(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; - string tmpstr; + std::string tmpstr; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) return DEVICE_OK; @@ -977,12 +981,13 @@ int CPLogic::OnCellType(MM::PropertyBase* pProp, MM::ActionType eAct, long index command << addressChar_ << "CCA Y?"; RETURN_ON_MM_ERROR ( hub_->QueryCommandVerify(command.str(),":A") ); RETURN_ON_MM_ERROR ( hub_->ParseAnswerAfterEquals(tmp) ); - bool success = 0; + bool success = false; if (currentPosition_ > numCells_) { switch (tmp) { case 0: success = pProp->Set(g_IOTypeCode0); break; case 1: success = pProp->Set(g_IOTypeCode1); break; case 2: success = pProp->Set(g_IOTypeCode2); break; + default: break; } } else { switch (tmp) { @@ -1002,7 +1007,7 @@ int CPLogic::OnCellType(MM::PropertyBase* pProp, MM::ActionType eAct, long index case 13:success = pProp->Set(g_CellTypeCode13); break; case 14:success = pProp->Set(g_CellTypeCode14); break; case 15:success = pProp->Set(g_CellTypeCode15); break; - default: success=0; + default: break; } } if (!success) @@ -1021,7 +1026,7 @@ int CPLogic::OnCellType(MM::PropertyBase* pProp, MM::ActionType eAct, long index int CPLogic::OnCellConfig(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1043,7 +1048,7 @@ int CPLogic::OnCellConfig(MM::PropertyBase* pProp, MM::ActionType eAct, long ind int CPLogic::OnInput1(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1065,7 +1070,7 @@ int CPLogic::OnInput1(MM::PropertyBase* pProp, MM::ActionType eAct, long index) int CPLogic::OnInput2(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1087,7 +1092,7 @@ int CPLogic::OnInput2(MM::PropertyBase* pProp, MM::ActionType eAct, long index) int CPLogic::OnInput3(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1109,7 +1114,7 @@ int CPLogic::OnInput3(MM::PropertyBase* pProp, MM::ActionType eAct, long index) int CPLogic::OnInput4(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1131,7 +1136,7 @@ int CPLogic::OnInput4(MM::PropertyBase* pProp, MM::ActionType eAct, long index) int CPLogic::OnIOType(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1140,12 +1145,12 @@ int CPLogic::OnIOType(MM::PropertyBase* pProp, MM::ActionType eAct, long index) command << addressChar_ << "CCA Y?"; RETURN_ON_MM_ERROR ( hub_->QueryCommandVerify(command.str(),":A") ); RETURN_ON_MM_ERROR ( hub_->ParseAnswerAfterEquals(tmp) ); - bool success = 0; + bool success = false; switch (tmp) { case 0: success = pProp->Set(g_IOTypeCode0); break; case 1: success = pProp->Set(g_IOTypeCode1); break; case 2: success = pProp->Set(g_IOTypeCode2); break; - default: success=0; + default: break; } if (!success) return DEVICE_INVALID_PROPERTY_VALUE; @@ -1162,7 +1167,7 @@ int CPLogic::OnIOType(MM::PropertyBase* pProp, MM::ActionType eAct, long index) int CPLogic::OnIOSourceAddress(MM::PropertyBase* pProp, MM::ActionType eAct, long index) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; if (eAct == MM::BeforeGet) { if (!refreshProps_ && initialized_) @@ -1184,12 +1189,12 @@ int CPLogic::OnIOSourceAddress(MM::PropertyBase* pProp, MM::ActionType eAct, lon int CPLogic::OnClearAllCellStates(MM::PropertyBase* pProp, MM::ActionType eAct) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); if (eAct == MM::BeforeGet) { pProp->Set(g_IdleState); } else if (eAct == MM::AfterSet) { - string tmpstr; + std::string tmpstr; pProp->Get(tmpstr); if (tmpstr.compare(g_DoItState) == 0) { @@ -1203,9 +1208,9 @@ int CPLogic::OnClearAllCellStates(MM::PropertyBase* pProp, MM::ActionType eAct) int CPLogic::OnSetCardPreset(MM::PropertyBase* pProp, MM::ActionType eAct) { - ostringstream command; command.str(""); + std::ostringstream command; command.str(""); long tmp; - string tmpstr; + std::string tmpstr; if (eAct == MM::BeforeGet) { // can't do anything of real value here if (!initialized_) diff --git a/DeviceAdapters/ASITiger/ASIPLogic.h b/DeviceAdapters/ASITiger/ASIPLogic.h index 6a9a18507..e3dd0bec6 100644 --- a/DeviceAdapters/ASITiger/ASIPLogic.h +++ b/DeviceAdapters/ASITiger/ASIPLogic.h @@ -22,8 +22,8 @@ // BASED ON: ASIStage.h and others // -#ifndef _ASIPLOGIC_H_ -#define _ASIPLOGIC_H_ +#ifndef ASIPLOGIC_H +#define ASIPLOGIC_H #include "ASIPeripheralBase.h" #include "MMDevice.h" @@ -36,7 +36,6 @@ class CPLogic : public ASIPeripheralBase ~CPLogic() { } // Device API - // ---------- int Initialize(); bool Busy() { return false; } @@ -46,7 +45,6 @@ class CPLogic : public ASIPeripheralBase int Fire(double /*deltaT*/) { return DEVICE_UNSUPPORTED_COMMAND; } // action interface - // ---------------- int OnPLogicMode (MM::PropertyBase* pProp, MM::ActionType eAct); int OnSetShutterChannel (MM::PropertyBase* pProp, MM::ActionType eAct); int OnPLogicOutputState (MM::PropertyBase* pProp, MM::ActionType eAct); @@ -78,24 +76,35 @@ class CPLogic : public ASIPeripheralBase private: - string axisLetter_; + std::string axisLetter_; unsigned int numCells_; unsigned int currentPosition_; // cached value of current position -// static const int NUM_CELLS = 16; - bool useAsdiSPIMShutter_; // used together with either useAs4ChShutter_ or useAs7ChShutter_, takes into account address 41 backplane (TTL0 for CameraA) + + // PLogic Mode Table + // -------------------- + // diSPIM | 4ch | 7ch | (useAsdiSPIMShutter_, useAs4ChShutter_, useAs7ChShutter_) + // -------------------- + // 0 | 0 | 0 | "None" + // 1 | 1 | 0 | "diSPIM Shutter" + // 0 | 1 | 0 | "Four-channel shutter" + // 0 | 0 | 1 | "Seven-channel shutter" + // 1 | 0 | 1 | "Seven-channel TTL shutter" + bool useAsdiSPIMShutter_; bool useAs4ChShutter_; bool useAs7ChShutter_; + // used together with either useAs4ChShutter_ or useAs7ChShutter_, + // takes into account address 41 backplane (TTL0 for CameraA) + bool shutterOpen_; - bool advancedPropsEnabled_; bool editCellUpdates_; + bool advancedPropsEnabled_; // flag to only create advanced properties once - int SetShutterChannel(); int SetPositionDirectly(unsigned int position); - int GetCellPropertyName(long index, string suffix, char* name); - int GetIOPropertyName(long index, string suffix, char* name); + int GetCellPropertyName(long index, const std::string& suffix, char* name); + int GetIOPropertyName(long index, const std::string& suffix, char* name); int RefreshAdvancedCellPropertyValues(long index); int RefreshCurrentPosition(); int RefreshEditCellPropertyValues(); }; -#endif //_ASIPLOGIC_H_ +#endif // ASIPLOGIC_H diff --git a/DeviceAdapters/ASITiger/ASITiger.h b/DeviceAdapters/ASITiger/ASITiger.h index 120418220..c466a8519 100644 --- a/DeviceAdapters/ASITiger/ASITiger.h +++ b/DeviceAdapters/ASITiger/ASITiger.h @@ -478,6 +478,8 @@ const char* const g_CellTypeCode12 = "12 - D flop (sync)"; const char* const g_CellTypeCode13 = "13 - JK flop"; const char* const g_CellTypeCode14 = "14 - one shot (NRT)"; const char* const g_CellTypeCode15 = "15 - delay (NRT)"; +const char* const g_CellTypeCode16 = "16 - one shot OR2 (NRT)"; +const char* const g_CellTypeCode17 = "17 - delay OR2 (NRT)"; const char* const g_IOTypeCode0 = "0 - input"; const char* const g_IOTypeCode1 = "1 - output (open-drain)"; const char* const g_IOTypeCode2 = "2 - output (push-pull)";