Improve:LinuxApi McuProtocolHandle StatusCode include cleaner.
This commit is contained in:
		
							parent
							
								
									67d5e2014f
								
							
						
					
					
						commit
						ab3fd3cc3d
					
				| 
						 | 
				
			
			@ -18,7 +18,6 @@
 | 
			
		|||
#include <stdio.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include <sys/time.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <termios.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,11 +13,13 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
#include "LinuxApi.h"
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#include <stddef.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <sys/select.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include <sys/time.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <termios.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,8 +13,9 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
#include "LittleEndianHandle.h"
 | 
			
		||||
#include "ILog.h"
 | 
			
		||||
#include "ModBusCRC16.h"
 | 
			
		||||
#include "ProtocolHandle.h"
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <netinet/in.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
LittleEndianHandle::LittleEndianHandle(const std::shared_ptr<VProtocolParam> ¶m) : ProtocolHandle(param)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,14 @@
 | 
			
		|||
#include "McuProtocol.h"
 | 
			
		||||
#include "ILog.h"
 | 
			
		||||
#include "ProtocolHandle.h"
 | 
			
		||||
#include "StatusCode.h"
 | 
			
		||||
#include <cstddef>
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <mutex>
 | 
			
		||||
#include <semaphore.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
std::shared_ptr<VProtocolBase> VProtocolBase::SharedFromThis(void)
 | 
			
		||||
{
 | 
			
		||||
    return std::make_shared<VProtocolBase>();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,10 @@
 | 
			
		|||
#include "McuProtocolMakePtr.h"
 | 
			
		||||
#include "ILog.h"
 | 
			
		||||
#include "LittleEndianHandle.h"
 | 
			
		||||
#include <netinet/in.h>
 | 
			
		||||
#include "ProtocolHandle.h"
 | 
			
		||||
#include "StatusCode.h"
 | 
			
		||||
#include <cstddef>
 | 
			
		||||
#include <memory>
 | 
			
		||||
std::shared_ptr<McuProtocolMakePtr> &McuProtocolMakePtr::GetInstance(std::shared_ptr<McuProtocolMakePtr> *impl)
 | 
			
		||||
{
 | 
			
		||||
    static auto instance = std::make_shared<McuProtocolMakePtr>();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,14 @@
 | 
			
		|||
#include "McuProtocol.h"
 | 
			
		||||
#include "McuProtocolMakePtr.h"
 | 
			
		||||
#include "ModBusCRC16.h"
 | 
			
		||||
#include "StatusCode.h"
 | 
			
		||||
#include <functional>
 | 
			
		||||
#include <map>
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <mutex>
 | 
			
		||||
#include <netinet/in.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
using std::placeholders::_1;
 | 
			
		||||
// using std::placeholders::_2;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,6 @@
 | 
			
		|||
 */
 | 
			
		||||
#include "StatusCode.h"
 | 
			
		||||
#include "ILog.h"
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
static const char *StatusCodeString[STATUS_CODE_END + 1] = {"STATUS_CODE_OK",
 | 
			
		||||
                                                            "STATUS_CODE_NOT_OK",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user