summaryrefslogtreecommitdiff
path: root/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example')
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastReceive.py25
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastSend.py30
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastReceive.py31
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastSend.py30
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoClient.py28
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoServer.py30
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoClient.py28
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoServer.py27
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/__init__.py16
9 files changed, 0 insertions, 245 deletions
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastReceive.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastReceive.py
deleted file mode 100644
index 2e846ca19e..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastReceive.py
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-
-BROADCAST_PORT = 58083
-
-s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-s.bind(('0.0.0.0', BROADCAST_PORT))
-
-while True:
- print s.recvfrom(256)
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastSend.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastSend.py
deleted file mode 100644
index 0a5f8c3201..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/BroadcastSend.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-from time import sleep, time
-
-BROADCAST_PORT = 58083
-
-s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-s.bind(('', 0))
-s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
-
-while True:
- print "Broadcasting..."
- data = 'Hello World: ' + repr(time()) + '\n'
- s.sendto(data, ('<broadcast>', BROADCAST_PORT))
- sleep(1)
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastReceive.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastReceive.py
deleted file mode 100644
index 9001f40b7d..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastReceive.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-import struct
-
-MCAST_GRP = '224.1.1.1'
-MCAST_PORT = 5007
-
-sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
-sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-sock.bind(('', MCAST_PORT))
-mreq = struct.pack("4sl", socket.inet_aton(MCAST_GRP), socket.INADDR_ANY)
-
-sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
-
-while True:
- print sock.recv(10240)
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastSend.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastSend.py
deleted file mode 100644
index 8efd4534ae..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/MulticastSend.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-from time import sleep, time
-
-MCAST_GRP = '224.1.1.1'
-MCAST_PORT = 5007
-
-sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
-sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
-
-while True:
- print "Multicast to group: %s\n" % MCAST_GRP
- data = 'Hello World: ' + repr(time()) + '\n'
- sock.sendto(data, (MCAST_GRP, MCAST_PORT))
- sleep(1)
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoClient.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoClient.py
deleted file mode 100644
index dfa9bfdae7..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoClient.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-
-ECHO_SERVER_ADDRESS = "10.2.202.45"
-ECHO_PORT = 7
-
-s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-s.connect((ECHO_SERVER_ADDRESS, ECHO_PORT))
-
-s.sendall('Hello, world')
-data = s.recv(1024)
-s.close()
-print 'Received', repr(data)
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoServer.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoServer.py
deleted file mode 100644
index 1324edbe64..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/TCPEchoServer.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-
-s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-s.bind(('', 7))
-s.listen(1)
-
-while True:
- conn, addr = s.accept()
- print 'Connected by', addr
- while True:
- data = conn.recv(1024)
- if not data: break
- conn.sendall(data)
- conn.close()
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoClient.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoClient.py
deleted file mode 100644
index 6a6cf8c902..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoClient.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-
-ECHO_SERVER_ADDRESS = '10.2.202.45'
-ECHO_PORT = 7
-
-sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-
-sock.sendto("Hello World\n", (ECHO_SERVER_ADDRESS, ECHO_PORT))
-response = sock.recv(256)
-sock.close()
-
-print response
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoServer.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoServer.py
deleted file mode 100644
index 38503489ee..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/UDPEchoServer.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-import socket
-
-ECHO_PORT = 7
-
-sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-sock.bind(('', ECHO_PORT))
-
-while True:
- data, address = sock.recvfrom(256)
- print "datagram from", address
- sock.sendto(data, address)
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/__init__.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/__init__.py
deleted file mode 100644
index 10e7e1d1de..0000000000
--- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/example/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-mbed SDK
-Copyright (c) 2011-2013 ARM Limited
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-""" \ No newline at end of file