Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Accelerator Control System
epics-support
mcan
Commits
86107891
Commit
86107891
authored
Jun 23, 2017
by
Franksen, Benjamin
Browse files
scan: re-enabled systec-ascii for Linux
parent
4e384078
Changes
3
Hide whitespace changes
Inline
Side-by-side
MultiCAN/src/Makefile
View file @
86107891
...
...
@@ -61,7 +61,7 @@ mCANCore_SRCS_$(OS_CLASS) += ellsi.c
mCANCore_OBJS_$(OS_CLASS)
+=
systec.o
endif
# this is currently broken:
#
mCANCore_SRCS_Linux += socketcan.c
mCANCore_SRCS_Linux
+=
socketcan.c
INC
+=
scan.h
INC
+=
socketcan.h
INC
+=
systec-ascii.h
...
...
MultiCAN/src/drivers/scan/systec-ascii.c
View file @
86107891
...
...
@@ -346,8 +346,7 @@ int systecConfigPort(int can_port, const char *ip_addr, int ip_port) {
if
(
state
)
{
/* success, prepare addr with parameters ip_addr and ip_port */
state
->
addr
.
sin_family
=
AF_INET
;
state
->
addr
.
sin_port
=
htons
(
ip_port
);
if
(
inet_aton
(
ip_addr
,
&
state
->
addr
.
sin_addr
))
{
if
(
aToIPAddr
(
ip_addr
,
ip_port
,
&
state
->
addr
)
<
0
)
{
/* success, connect socket */
if
(
connect
(
sock
,
(
struct
sockaddr
*
)
&
state
->
addr
,
sizeof
(
struct
sockaddr_in
))
>=
0
)
{
/* success, allocate port_addr and methods */
...
...
mCANSupport/scan_iocsh.c
View file @
86107891
...
...
@@ -7,7 +7,6 @@
#include
"epicsExport.h"
#include
"iocsh.h"
#if 0
static
const
iocshArg
socketcanConfigPortArg0
=
{
"port_num"
,
iocshArgInt
};
static
const
iocshArg
socketcanConfigPortArg1
=
{
"ifname"
,
iocshArgString
};
static
const
iocshArg
*
const
socketcanConfigPortArgs
[]
=
{
...
...
@@ -18,7 +17,6 @@ static void socketcanConfigPortCall(const iocshArgBuf *args)
{
socketcanConfigPort
(
args
[
0
].
ival
,
args
[
1
].
sval
);
}
#endif
static
const
iocshArg
systecConfigPortArg0
=
{
"can_port"
,
iocshArgInt
};
static
const
iocshArg
systecConfigPortArg1
=
{
"ip_addr"
,
iocshArgString
};
...
...
@@ -57,9 +55,7 @@ static void scanRegisterCommands(void)
static
int
firstTime
=
1
;
if
(
firstTime
)
{
firstTime
=
0
;
#if 0
iocshRegister
(
&
socketcanConfigPortDef
,
socketcanConfigPortCall
);
#endif
iocshRegister
(
&
systecConfigPortDef
,
systecConfigPortCall
);
iocshRegister
(
&
ellsiConfigPortDef
,
ellsiConfigPortCall
);
iocshRegister
(
&
scanDumpPortsDef
,
scanDumpPortsCall
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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