添加了位置定标程序 及位置移动相关程序源码

This commit is contained in:
2022-01-12 14:30:11 +08:00
parent 5b44f94a64
commit f0ecbb8710
446 changed files with 34544 additions and 0 deletions

View File

@ -0,0 +1,49 @@
/***************************************************//**
* @file BusConnectException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This exception should be used when an error is
* encountered when trying to connect to a bus,
* generally a failed open() or socket connect() call, or
* a failed read() or write() due to an EOF.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef BUSCONNECTEXCEPTION_H
#define BUSCONNECTEXCEPTION_H
#include "common/exceptions/BusException.h"
namespace seabreeze {
class BusConnectException : public BusException {
public:
BusConnectException(const std::string &error);
};
}
#endif /* BUSCONNECTEXCEPTION_H */

View File

@ -0,0 +1,50 @@
/***************************************************//**
* @file BusException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This is a base class for a family of exceptions that
* arise from errors in bus transfers. These may be thrown
* at the bus layer, and all exceptions thrown at
* that layer must extend this class so that they can be
* uniformly handled.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef SEABREEZE_BUSEXCEPTION_H
#define SEABREEZE_BUSEXCEPTION_H
#include <stdexcept>
namespace seabreeze {
class BusException : public std::runtime_error {
public:
BusException(const std::string &error);
};
}
#endif

View File

@ -0,0 +1,48 @@
/***************************************************//**
* @file BusTransferException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This exception should be used when an error is
* encountered when trying to read from or write to
* a bus.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef BUSTRANSFEREXCEPTION_H
#define BUSTRANSFEREXCEPTION_H
#include "common/exceptions/BusException.h"
namespace seabreeze {
class BusTransferException : public BusException {
public:
BusTransferException(const std::string &error);
};
}
#endif /* BUSTRANSFEREXCEPTION_H */

View File

@ -0,0 +1,47 @@
/***************************************************//**
* @file FeatureControlException.h
* @date March 2009
* @author Ocean Optics, Inc.
*
* This exception should be used when an error is
* encountered when trying to interact with a feature.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef FEATURECONTROLEXCEPTION_H
#define FEATURECONTROLEXCEPTION_H
#include "common/exceptions/FeatureException.h"
namespace seabreeze {
class FeatureControlException : public FeatureException {
public:
FeatureControlException(const std::string &error);
};
}
#endif /* FEATURECONTROLEXCEPTION_H */

View File

@ -0,0 +1,50 @@
/***************************************************//**
* @file FeatureException.h
* @date March 2009
* @author Ocean Optics, Inc.
*
* This is a base class for a family of exceptions that
* arise from errors in feature interaction. These may be thrown
* at the feature layer, and all exceptions thrown at
* that layer must extend this class so that they can be
* uniformly handled.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef SEABREEZE_FEATUREEXCEPTION_H
#define SEABREEZE_FEATUREEXCEPTION_H
#include <stdexcept>
namespace seabreeze {
class FeatureException : public std::runtime_error {
public:
FeatureException(const std::string &error);
};
}
#endif

View File

@ -0,0 +1,48 @@
/***************************************************//**
* @file FeatureProtocolNotFoundException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This exception should be used when a protocol is
* specified, but no matching implementation of that
* protocol can be found for a particular feature.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef FEATUREPROTOCOLNOTFOUNDEXCEPTION_H
#define FEATUREPROTOCOLNOTFOUNDEXCEPTION_H
#include "common/exceptions/FeatureException.h"
namespace seabreeze {
class FeatureProtocolNotFoundException : public FeatureException {
public:
FeatureProtocolNotFoundException(const std::string &error);
};
}
#endif /* FEATUREPROTOCOLNOTFOUNDEXCEPTION_H */

View File

@ -0,0 +1,50 @@
/***************************************************//**
* @file IllegalArgumentException.h
* @date March 2009
* @author Ocean Optics, Inc.
*
* This is an exception for use when a value is passed to
* a method that is not permitted. This may include
* specifying a parameter that is out of bounds or of
* the wrong type.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef SEABREEZE_ILLEGALARGUMENTEXCEPTION_H
#define SEABREEZE_ILLEGALARGUMENTEXCEPTION_H
#include <stdexcept>
#include <string>
namespace seabreeze {
class IllegalArgumentException : public std::invalid_argument {
public:
IllegalArgumentException(const std::string &error);
};
}
#endif

View File

@ -0,0 +1,49 @@
/***************************************************//**
* @file NumberFormatException.h
* @date March 2009
* @author Ocean Optics, Inc.
*
* This is an exception for use when a string is to be
* parsed into a number but the string does not contain
* a recognizable number.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef SEABREEZE_NUMBERFORMATEXCEPTION_H
#define SEABREEZE_NUMBERFORMATEXCEPTION_H
#include <stdexcept>
#include <string>
namespace seabreeze {
class NumberFormatException : public std::runtime_error {
public:
NumberFormatException(const std::string &error);
};
}
#endif

View File

@ -0,0 +1,49 @@
/***************************************************//**
* @file ProtocolBusMismatchException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This exception should be used when a protocol is
* specified, but the bus and protocol are not suited to
* each other (e.g. there is no bus helper for the hints
* the protocol can provide).
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef PROTOCOLBUSMISMATCHEXCEPTION_H
#define PROTOCOLBUSMISMATCHEXCEPTION_H
#include "common/exceptions/ProtocolException.h"
namespace seabreeze {
class ProtocolBusMismatchException : public ProtocolException {
public:
ProtocolBusMismatchException(const std::string &error);
};
}
#endif /* PROTOCOLBUSMISMATCHEXCEPTION_H */

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file ProtocolException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This is a base class for a family of exceptions that
* arise from errors in protocols. These may be thrown
* at the protocol layer, and all exceptions thrown at
* that layer must extend this class so that they can be
* uniformly handled.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef SEABREEZE_PROTOCOLEXCEPTION_H
#define SEABREEZE_PROTOCOLEXCEPTION_H
#include <stdexcept>
#include <string>
namespace seabreeze {
class ProtocolException : public std::runtime_error {
public:
ProtocolException(const std::string &error);
};
}
#endif

View File

@ -0,0 +1,50 @@
/***************************************************//**
* @file ProtocolFormatException.h
* @date February 2009
* @author Ocean Optics, Inc.
*
* This exception should be used when a protocol message
* cannot be decoded, fails a checksum, or otherwise is
* out of spec. This may indicate that the driver is now
* out of synch with this code and that measures should be
* taken to re-establish communications.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef PROTOCOLFORMATEXCEPTION_H
#define PROTOCOLFORMATEXCEPTION_H
#include "common/exceptions/ProtocolException.h"
namespace seabreeze {
class ProtocolFormatException : public ProtocolException {
public:
ProtocolFormatException(const std::string &error);
};
}
#endif /* PROTOCOLFORMATEXCEPTION_H */

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file ProtocolTransactionException.h
* @date January 2015
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
*
* This is a base class for a family of exceptions that
* arise from errors in during OBPTransactions. These may be thrown
* at the protocol layer, and all exceptions thrown at
* that layer must extend this class so that they can be
* uniformly handled.
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************/
#ifndef SEABREEZE_PROTOCOLTRANSACTIONEXCEPTION_H
#define SEABREEZE_PROTOCOLTRANSACTIONEXCEPTION_H
#include <stdexcept>
#include <string>
namespace seabreeze {
class ProtocolTransactionException : public std::runtime_error {
public:
ProtocolTransactionException(const std::string &error);
};
}
#endif