Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PrtLib
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李定达
PrtLib
Commits
da6f455d
Commit
da6f455d
authored
Mar 02, 2019
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.调整DoPrintWithXML不在加载dll;2.调整报错提示;
parent
d12259e4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
.gitignore
+2
-0
PrtLib/PrtLib.sln
+6
-0
PrtLib/PrtLib.suo
+0
-0
PrtLib/PrtLib/PrintLib.cpp
+11
-11
PrtLib/PrtLib/prtlib.cpp
+6
-6
No files found.
.gitignore
View file @
da6f455d
...
...
@@ -8,3 +8,5 @@ PrtLib/PrtLib/Debug/
*.sdf
PrtLib/Release/
PrtLib/PrtLib/Release/
PrtLib/TestPrtLib/
*.opensdf
PrtLib/PrtLib.sln
View file @
da6f455d
...
...
@@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrtLib", "PrtLib\PrtLib.vcxproj", "{597A700E-054E-438B-A0A5-B484BF0CBDF6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPrtLib", "TestPrtLib\TestPrtLib.vcxproj", "{46BD73FE-16B1-494D-82D0-19CBEA18C10B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
...
...
@@ -13,6 +15,10 @@ Global
{597A700E-054E-438B-A0A5-B484BF0CBDF6}.Debug|Win32.Build.0 = Debug|Win32
{597A700E-054E-438B-A0A5-B484BF0CBDF6}.Release|Win32.ActiveCfg = Release|Win32
{597A700E-054E-438B-A0A5-B484BF0CBDF6}.Release|Win32.Build.0 = Release|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Debug|Win32.ActiveCfg = Debug|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Debug|Win32.Build.0 = Debug|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Release|Win32.ActiveCfg = Release|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
PrtLib/PrtLib.suo
View file @
da6f455d
No preview for this file type
PrtLib/PrtLib/PrintLib.cpp
View file @
da6f455d
...
...
@@ -49,7 +49,7 @@ PrintLib::PrintLib(void)
// }
//}
m_b_load_sucfl
=
LoadAddress
();
//
m_b_load_sucfl = LoadAddress();
}
void
PrintLib
::
_PrintLine
(
rapidxml
::
xml_node
<>
*
node
,
rapidjson
::
Document
&
jsonDoc
,
rapidjson
::
Value
&
childNode
)
...
...
@@ -172,7 +172,7 @@ void PrintLib::_XMLiterate(rapidxml::xml_node<> *node,rapidjson::Document &jsonD
PrintLib
::~
PrintLib
(
void
)
{
Unloaddll
();
//
Unloaddll();
}
PrintLib
&
PrintLib
::
GetInstance
()
...
...
@@ -226,14 +226,14 @@ bool PrintLib::DoPrint(std::string prtStr, std::string orderStr, std::string xml
LOG
()
<<
"Order Info:"
<<
orderStr
;
LOG
()
<<
"XML Info:"
<<
xmlStr
;
if
(
m_b_load_sucfl
==
false
)
{
if
(
!
LoadAddress
()){
error
=
"LaodAddress failed"
;
LOG
()
<<
"f_LaodAddress failed
\r\n
"
;
return
false
;
}
}
//
if(m_b_load_sucfl == false)
//
{
//
if(!LoadAddress()){
//
error = "LaodAddress failed";
//
LOG() << "f_LaodAddress failed\r\n";
//
return false;
//
}
//
}
char
prtjson
[
1024
]
=
{
0
};
memcpy
(
prtjson
,
prtStr
.
c_str
(),
prtStr
.
size
());
...
...
@@ -862,7 +862,7 @@ MathArguments PrintLib::_ParseMathArgumnets( const rapidxml::xml_node<>* e )
void
PrintLib
::
_PrintData
(
const
LinePrintArguments
&
arguments
)
{
std
::
string
text
=
arguments
.
text
;
printf
(
"%s
\n
"
,
text
);
//
printf("%s\n",text);
std
::
string
printType
=
arguments
.
printType
;
int
fontType
=
arguments
.
fontType
;
int
fontStyle
=
arguments
.
fontStyle
;
...
...
PrtLib/PrtLib/prtlib.cpp
View file @
da6f455d
...
...
@@ -1588,12 +1588,12 @@ void CommPort()
if
(
g_hComm
!=
INVALID_HANDLE_VALUE
)
{
LOG
()
<<
"串口"
<<
func
<<
",比特率"
<<
g_info
.
baudrate
<<
",数据位"
<<
g_info
.
databits
<<
",停止位"
<<
g_info
.
stopbits
<<
",校验位"
<<
g_info
.
parity
<<
",控制"
<<
g_info
.
flowcontrol
;
LOG
()
<<
"
驱动
打开成功:"
<<
func
;
LOG
()
<<
"
串口
打开成功:"
<<
func
;
}
else
{
LOG
()
<<
"
驱动
打开失败:"
<<
func
;
LOG
()
<<
"
串口
打开失败:"
<<
func
;
}
}
...
...
@@ -1607,11 +1607,11 @@ void ParallelPort()
if
(
g_hComm
!=
INVALID_HANDLE_VALUE
)
{
LOG
()
<<
"
驱动
打开成功:"
<<
func
;
LOG
()
<<
"
并口
打开成功:"
<<
func
;
}
else
{
LOG
()
<<
"
驱动
打开失败:"
<<
func
;
LOG
()
<<
"
并口
打开失败:"
<<
func
;
}
}
...
...
@@ -1632,11 +1632,11 @@ void NetPort()
if
(
g_hComm
!=
INVALID_HANDLE_VALUE
)
{
LOG
()
<<
"
驱动
打开成功:"
<<
func
;
LOG
()
<<
"
网口
打开成功:"
<<
func
;
}
else
{
LOG
()
<<
"
驱动
打开失败:"
<<
func
;
LOG
()
<<
"
网口
打开失败:"
<<
func
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment