JP5609202B2 - Terminal device and program - Google Patents

Terminal device and program Download PDF

Info

Publication number
JP5609202B2
JP5609202B2 JP2010071188A JP2010071188A JP5609202B2 JP 5609202 B2 JP5609202 B2 JP 5609202B2 JP 2010071188 A JP2010071188 A JP 2010071188A JP 2010071188 A JP2010071188 A JP 2010071188A JP 5609202 B2 JP5609202 B2 JP 5609202B2
Authority
JP
Japan
Prior art keywords
communication
terminal device
communication partner
cpu
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010071188A
Other languages
Japanese (ja)
Other versions
JP2011205435A (en
Inventor
徹 北川
徹 北川
泰生 岸上
泰生 岸上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2010071188A priority Critical patent/JP5609202B2/en
Publication of JP2011205435A publication Critical patent/JP2011205435A/en
Application granted granted Critical
Publication of JP5609202B2 publication Critical patent/JP5609202B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Near-Field Transmission Systems (AREA)

Description

本発明は、端末装置及びプログラムに関する。   The present invention relates to a terminal device and a program.

従来、商品に取り付けられたRFID(Radio Frequency Identification)タグ等のNFC(Near Field Communication)カードを、NFC技術を用いて読取り、当該NFCカードに書き込まれたデータを取得可能な機能を備えるハンディターミナルなどの端末装置が知られている。当該端末装置は、上記データの読取り機能に加えて、自機と相手機(通信相手)との間で上記NFC技術を用いた通信機能が備えられており、読取ったデータを送受信等することにより商品に関する管理情報を相互に収集可能なことから、商品資産の棚卸しや商品の在庫管理など多様な用途がある。   Conventionally, a handy terminal having a function capable of reading an NFC (Near Field Communication) card such as an RFID (Radio Frequency Identification) tag attached to a product using NFC technology and acquiring data written on the NFC card. The terminal device is known. In addition to the data reading function, the terminal device is provided with a communication function using the NFC technology between the own device and the other device (communication partner). Since management information about products can be collected mutually, there are various uses such as inventory of product assets and inventory management of products.

ところが、端末装置にて上記NFC技術を用いた通信機能を実行するには、通信時において自機と相手機の端末装置を送信モードとするか受信モードとするか、を操作パネルなどを介して事前に設定しておく必要があった。そのため、通信設定に手間や時間がかかるとともに、端末装置の設定操作の習熟が要求されるので、ユーザにとって利便性に欠くという問題があった。   However, in order to execute the communication function using the NFC technology in the terminal device, whether the terminal device of the own device and the partner device is set to the transmission mode or the reception mode at the time of communication is set via the operation panel or the like. It was necessary to set in advance. For this reason, there is a problem in that it takes time and effort to set the communication, and it is necessary to master the setting operation of the terminal device, which is inconvenient for the user.

そこで、デジタルカメラにおいて、姿勢検出装置を備え、当該姿勢検出装置にてデジタルカメラの姿勢を検知し、下向きの姿勢にあるデジタルカメラ(送信モードのデジタルカメラ)より上向きの姿勢にあるデジタルカメラ(受信モードのデジタルカメラ)に向けて、自動的に画像データの送信が可能なものが知られている(例えば、特許文献1等参照)。   Therefore, the digital camera is equipped with a posture detection device, and the posture detection device detects the posture of the digital camera, and the digital camera in the upward posture from the digital camera in the downward posture (digital camera in the transmission mode) (reception) A digital camera capable of automatically transmitting image data is known (for example, see Patent Document 1).

特開平2009−253511号公報JP 2009-253511 A

上記特許文献1に記載のデジタルカメラによると、通信設定における送信モードと受信モードの事前設定が不要になるため、データの送受信が容易になる。   According to the digital camera described in Patent Document 1, it is not necessary to set the transmission mode and the reception mode in advance in communication settings, so that data can be easily transmitted and received.

しかしながら、上記特許文献1に記載のデジタルカメラでは、通信内容としてデータの送受信が可能であれば足りると推測されるが、商品の在庫管理などの多様な用途を備える端末装置では、例えば、データの送受信,データの初期化,自機と相手機とのデータの同期処理,などのように通信内容が多岐に亘る場合が考えられる。このような場合、ユーザは操作パネルなどを介して実施すべき通信内容を事前に設定しておく必要があるため、ユーザにとって依然利便性に欠くという問題があった。   However, in the digital camera described in Patent Document 1, it is estimated that it is sufficient if data can be transmitted and received as communication contents. However, in a terminal device having various uses such as inventory management of goods, for example, data There may be a variety of communication contents such as transmission / reception, data initialization, and data synchronization processing between the own device and the other device. In such a case, there is a problem that the user still lacks convenience because it is necessary for the user to set in advance communication contents to be performed via the operation panel or the like.

そこで、本発明の課題は、ユーザにとっての利便性の高い端末装置及びプログラムを提供する。   Therefore, an object of the present invention is to provide a terminal device and a program that are highly convenient for the user.

請求項1に記載の発明は、通信相手装置と非接触通信で送受信制御を行う端末装置であって、近距離にある通信相手装置を検索することで当該通信相手装置との通信を一時的に確立する通信確立手段と、当該端末装置本体の姿勢または動作を検出する検出手段と、前記通信相手装置との一時的な通信確立後にあって、前記検出手段で検出した当該端末装置の姿勢または動作に基づいて、当該端末装置を送信モードとするか受信モードとするかを設定する設定手段と、前記設定手段で当該端末装置を送信モードに確定して設定した際は、前記通信相手装置に受信モード設定を指示して当該通信相手装置に対するデータ送信処理を制御し、前記設定手段で当該端末装置を受信モードに確定して設定した際は、前記通信相手装置に送信モード設定を指示して当該通信相手装置からのデータ受信処理を制御し、前記何れのモードにも確定しない場合にはエラーとして一時的に確立した前記通信を解除し、前記通信確立手段による再度の検索を行うように制御する送受信制御手段、を具備したことを特徴とする。 The invention according to claim 1 is a terminal device that performs transmission / reception control with a communication partner device by contactless communication, and temporarily searches for a communication partner device at a short distance to temporarily communicate with the communication partner device. Establishing communication establishing means, detecting means for detecting the attitude or operation of the terminal device main body, and after establishing temporary communication with the communication counterpart device, the attitude or operation of the terminal device detected by the detecting means Based on the setting means for setting whether the terminal device is set to the transmission mode or the reception mode, and when the terminal device is determined to be set to the transmission mode by the setting means and received by the communication partner device When the mode setting is instructed to control the data transmission process for the communication counterpart device, and the terminal device is determined and set to the reception mode by the setting means, the transmission counterpart setting is set to the communication counterpart device. It indicates and controls the data receiving process from the communication partner apparatus, wherein releasing the communication was temporarily established as an error if neither determined in any mode, to perform a search again by the communication establishing means And a transmission / reception control means for controlling .

請求項6に記載の発明は、通信相手装置と非接触通信で送受信制御を行う端末装置であって、当該端末装置本体の姿勢または動作を検出する検出手段と、近距離にある前記通信相手装置を検索することで当該通信相手装置を通信相手として特定し、その特定された通信相手装置との通信確立を行った後にその通信相手装置の姿勢または動作を当該通信相手装置から取得する取得手段と、前記検出手段で検出した当該端末装置の姿勢または動作と、前記取得手段で取得した前記通信相手装置の姿勢または動作と、に基づいて、複数の通信動作内容の内で、前記通信確立後に当該端末装置と前記通信相手装置との間で通信を行う際の双方の通信動作内容を決定する決定手段と、前記決定手段で決定された通信動作内容に基づいて当該端末装置と前記通信相手装置との間での非接触通信を行う通信制御手段と、を具備したことを特徴とする。

The invention according to claim 6 is a terminal device that performs transmission / reception control by contactless communication with a communication partner device, the detection means for detecting the attitude or operation of the terminal device body, and the communication partner device at a short distance Acquiring the communication partner device as a communication partner by searching for the communication partner device, and acquiring the attitude or operation of the communication partner device from the communication partner device after establishing communication with the specified communication partner device; Based on the posture or action of the terminal device detected by the detection means and the posture or action of the communication counterpart device acquired by the acquisition means, the communication device establishes the communication after the communication is established among a plurality of communication operation contents. determining means for determining both the communication operation content for communication between the terminal device and the communication partner device, the terminal device and the front on the basis of a communication operation content determined by said determining means A communication control means for performing non-contact communication with the communication partner apparatus is characterized in that comprises a.

したがって、本発明は、ユーザにとっての利便性の高い端末装置及びプログラムを提供できる。   Therefore, the present invention can provide a terminal device and a program that are highly convenient for the user.

本発明に係る端末装置を模式的に例示した外観図である。It is the external view which illustrated typically the terminal device which concerns on this invention. 図1の端末装置の制御構造を表すブロック図である。It is a block diagram showing the control structure of the terminal device of FIG. 本発明に係る自機と通信相手とが行う通信処理を説明するためのフローチャートである。It is a flowchart for demonstrating the communication process which the own machine and communication partner which concern on this invention perform. 本発明に係る自機を通信相手との通信時における送信モードに設定するパターンと受信モードに設定するパターンとがランダムに切換わる状態を説明するための図である。It is a figure for demonstrating the state which switches the pattern which sets the own machine which concerns on this invention to the transmission mode at the time of communication with a communicating party, and the pattern set to a reception mode at random. 本発明に係る端末装置1の姿勢変化量を模式的に説明するための図である。It is a figure for demonstrating typically the attitude | position change amount of the terminal device 1 which concerns on this invention. 本発明に係る機能識別コードテーブルを説明するための図である。It is a figure for demonstrating the function identification code table which concerns on this invention. 本発明に係る通信処理テーブルを説明するための図である。It is a figure for demonstrating the communication processing table which concerns on this invention. 本発明に係る端末装置1の動作パターン1〜6を説明するための図である。It is a figure for demonstrating the operation patterns 1-6 of the terminal device 1 which concerns on this invention. 本発明に係る端末装置1の動作パターン7〜11を説明するための図である。It is a figure for demonstrating the operation patterns 7-11 of the terminal device 1 which concerns on this invention. 密着状態が成立している場合の自機1aと通信相手1bの位置関係及び姿勢変化量を説明するための図である。It is a figure for demonstrating the positional relationship and attitude | position change amount of the own machine 1a and communication partner 1b when the close_contact | adherence state is materialized. 近接状態が成立している場合の自機1aと通信相手1bの位置関係及び姿勢変化量を説明するための図である。It is a figure for demonstrating the positional relationship and the attitude | position change amount of the own machine 1a and communication partner 1b when a proximity | contact state is materialized. 本発明に係る通信状態確立処理を説明するためのフローチャートである。It is a flowchart for demonstrating the communication state establishment process which concerns on this invention. 本発明に係る機能確認処理を説明するためのフローチャートであり、(i)は自機が送信モード且つ通信相手1bが受信モードに一時的に設定されている場合の処理、(ii)は自機が受信モード且つ通信相手1bが送信モードに一時的に設定されている場合の処理、をそれぞれ示す。It is a flowchart for demonstrating the function confirmation process which concerns on this invention, (i) is a process in case an own machine is temporarily set to the transmission mode and the communication partner 1b is set to the receiving mode, (ii) is an own machine. Shows a process when the communication mode 1b is temporarily set to the reception mode and the communication partner 1b. 本発明に係る機能識別コードが自機と通信相手とで相違する場合に何れの機能識別コードを用いるかを例示した図である。It is the figure which illustrated which function identification code is used when the function identification code which concerns on this invention is different by an own machine and a communicating party. 本発明に係る通信実行処理を説明するためのフローチャートである。It is a flowchart for demonstrating the communication execution process which concerns on this invention. 本発明に係る第1動作判断処理を説明するためのフローチャートである。It is a flowchart for demonstrating the 1st operation | movement judgment process based on this invention. 本発明に係る第1動作判断処理を説明するためのフローチャートである。It is a flowchart for demonstrating the 1st operation | movement judgment process based on this invention. 本発明に係る送信モード処理を説明するためのフローチャートである。It is a flowchart for demonstrating the transmission mode process which concerns on this invention. 本発明に係る受信モード処理を説明するためのフローチャートである。It is a flowchart for demonstrating the reception mode process which concerns on this invention. 本発明に係る第2動作判断処理を説明するためのフローチャートである。It is a flowchart for demonstrating the 2nd operation | movement determination process based on this invention. 本発明に係る第2動作判断処理を説明するためのフローチャートである。It is a flowchart for demonstrating the 2nd operation | movement determination process based on this invention.

以下、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は図示例に限定されない。なお、以下の説明では、図1における端末装置1の左右方向をX軸方向、前後方向をY軸方向、高さ方向をZ軸方向とする。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples. In the following description, the left-right direction of the terminal device 1 in FIG. 1 is the X-axis direction, the front-rear direction is the Y-axis direction, and the height direction is the Z-axis direction.

本実施形態に係る端末装置1は、ハンディターミナルなどの端末である。そして、端末装置1の筐体2の外部には、図1に示されるように、上面側に設けられ、画像表示を行う表示部50と、表示部50の前方に設けられ、ユーザが各種操作を行うための操作部40と、が備えられる。また、表示部50の周囲には、当該表示部50を取囲むように矩形状に設けられ、NFC技術を用いた通信を行う通信アンテナ20が筐体2内部に内蔵されており、NFCカードの読取り,自機と通信相手(例えば、他の端末装置1)との相互通信を行う。ここで、以下の説明では、自機及び通信相手は、別個に設けられた二台の端末装置1と便宜上定め、自機には符号1aを、通信相手には符号1bを付すものとする。   The terminal device 1 according to the present embodiment is a terminal such as a handy terminal. As shown in FIG. 1, outside the casing 2 of the terminal device 1, the display unit 50 is provided on the upper surface side, and is provided in front of the display unit 50. And an operation unit 40 for performing the above. Further, around the display unit 50, a rectangular antenna is provided so as to surround the display unit 50, and a communication antenna 20 that performs communication using NFC technology is built in the housing 2. Reading and mutual communication between the own device and a communication partner (for example, another terminal device 1) are performed. Here, in the following description, the own device and the communication partner are determined for convenience as two terminal devices 1 provided separately, and the own device is denoted by reference numeral 1a, and the communication partner is denoted by reference symbol 1b.

次に、端末装置1の制御構造について、図2のブロック図を用いて説明する。   Next, the control structure of the terminal device 1 will be described with reference to the block diagram of FIG.

端末装置1は、図2に示すように、通信モジュール部10と、通信アンテナ20と、センサ部30と、操作部40と、表示部50と、音声出力部55と、2次記憶部60と、電源部70と、制御部100と、を含んで構成される。   As illustrated in FIG. 2, the terminal device 1 includes a communication module unit 10, a communication antenna 20, a sensor unit 30, an operation unit 40, a display unit 50, an audio output unit 55, and a secondary storage unit 60. The power supply unit 70 and the control unit 100 are included.

通信モジュール部10は、NFC技術を用いて非接触で通信相手1bとの通信を行うためのNFC規格に準拠したNFCリーダ/ライタである。そして、通信モジュール部10は、RFIDタグやその他の非接触ICカード等のNFCカードとの通信,又はNFCリーダ/ライタを備えた通信相手1bとの相互通信を行う。具体的には、通信モジュール部10は、NFCカードに誘導起電力による電力供給を行うためのキャリア電波の送信、NFCカードや通信相手1bと通信状態を確立するための応答要求信号(検索信号)や応答信号の送受信、通信処理内容に応じた通信処理信号、当該通信処理信号に対する応答処理を表す応答処理信号の送受信、等を通信アンテナ20を介して行う。
また、通信モジュール部10は、制御部100より送信される制御信号に応じて、NFC技術を用いた通信を実行する際に、自機1aを送信モード(送信側)に設定するか受信モード(受信側)に設定するかの切換えを行う。上記切換えにより、自機1aが送信モード(又はイニシエータモード)に設定され、通信相手1bが受信モード(又はターゲットモード)に設定された際の通信処理のフローが図3に例示される。
図3に示すように、送信モードに設定された自機1aは応答要求信号を送信して通信相手1bを検索する。そして、受信モードに設定された通信相手1bが当該応答要求信号を受信し、自機1aが通信相手1bより応答信号を受信できた場合に通信相手1bの検索が成功した(通信状態が確立される)こととなる。そして、当該通信状態が確立された状態で、自機1aが通信処理内容に応じた通信処理信号を通信相手1bに送信し、通信相手1bより応答処理信号を受信できた場合に通信処理が完了する。ここで、通信処理内容としては、自機1aと通信相手1bとの間でのデータの送受信処理,送信モードに設定された自機1a(通信相手1b)の設定値に基づく通信相手1b(自機1a)の初期化処理,自機1aと通信相手1bの双方の端末間でのデータの同期処理、等がある。
The communication module unit 10 is an NFC reader / writer that conforms to the NFC standard for performing contactless communication with the communication partner 1b using NFC technology. The communication module unit 10 performs communication with an NFC card such as an RFID tag or other non-contact IC card, or mutual communication with a communication partner 1b having an NFC reader / writer. Specifically, the communication module unit 10 transmits a carrier wave for supplying power to the NFC card by induced electromotive force, and a response request signal (search signal) for establishing a communication state with the NFC card or the communication partner 1b. And transmission / reception of response signals, communication processing signals according to the contents of communication processing, transmission / reception of response processing signals representing response processing for the communication processing signals, and the like are performed via the communication antenna 20.
In addition, when the communication module unit 10 executes communication using the NFC technology according to a control signal transmitted from the control unit 100, the communication module unit 10 sets the own device 1a to the transmission mode (transmission side) or the reception mode ( Switch whether to set to (Receive side). FIG. 3 illustrates a flow of communication processing when the own device 1a is set to the transmission mode (or initiator mode) and the communication partner 1b is set to the reception mode (or target mode) by the above switching.
As shown in FIG. 3, the own device 1a set to the transmission mode transmits a response request signal and searches for the communication partner 1b. Then, when the communication partner 1b set to the reception mode receives the response request signal and the own device 1a has received the response signal from the communication partner 1b, the communication partner 1b has been successfully searched (the communication state is established). The Rukoto. Then, when the communication state is established, the own device 1a transmits a communication processing signal corresponding to the communication processing content to the communication partner 1b, and the communication processing is completed when the response processing signal can be received from the communication partner 1b. To do. Here, the content of the communication process includes the data transmission / reception process between the own device 1a and the communication partner 1b, and the communication partner 1b (self Initialization processing of the machine 1a), data synchronization processing between the terminals of the own machine 1a and the communication partner 1b, and the like.

通信アンテナ20は、所定のコイル巻数からなるアンテナコイルであり、通信モジュール部10からの要求に応じて、キャリア電波や信号(応答要求信号,応答信号,通信処理信号、応答処理信号など)の送受信を行う。   The communication antenna 20 is an antenna coil having a predetermined number of coil turns, and transmits / receives a carrier wave or a signal (response request signal, response signal, communication processing signal, response processing signal, etc.) in response to a request from the communication module unit 10. I do.

センサ部30は、加速度センサ31と、角速度検出センサ32と、を含んで構成される。
加速度センサ31は、端末装置1がユーザによってX,Y,Z軸方向に並進移動された際のX,Y,Z軸方向それぞれの加速度を検出するための3軸加速度センサである。
角速度検出センサ32は、例えば、ジャイロセンサ(ジャイロスコープ)であり、ヨー方向,ローリング方向,ピッチング方向,それぞれの角速度を検出する。
そして、加速度センサ31にて検出された加速度及び角速度検出センサ32にて検出された角速度は、AD変換器(図示省略)等を介して制御部100に出力されることで、端末装置1(装置本体)の姿勢及び動作(アクション)が把握されるように構成されている。
The sensor unit 30 includes an acceleration sensor 31 and an angular velocity detection sensor 32.
The acceleration sensor 31 is a three-axis acceleration sensor for detecting accelerations in the X, Y, and Z axis directions when the terminal device 1 is translated in the X, Y, and Z axis directions by the user.
The angular velocity detection sensor 32 is, for example, a gyro sensor (gyroscope), and detects the respective angular velocities in the yaw direction, the rolling direction, and the pitching direction.
The acceleration detected by the acceleration sensor 31 and the angular velocity detected by the angular velocity detection sensor 32 are output to the control unit 100 via an AD converter (not shown) or the like, whereby the terminal device 1 (device) The posture of the main body) and the action (action) are grasped.

操作部40は、端末装置1をユーザが操作するための各種操作キーやボタン等を備えて構成され、ユーザにより操作された際に、当該操作された操作キーやボタンに応じた操作信号を制御部100に出力するように構成されている。   The operation unit 40 includes various operation keys and buttons for the user to operate the terminal device 1, and controls operation signals corresponding to the operated operation keys and buttons when operated by the user. It is configured to output to the unit 100.

表示部50は、LCD(Liquid Crystal Display)、ELD(Electro Luminescence Display)等により構成され、制御部100から入力される表示制御信号に応じて各種画像の表示処理を行う。なお操作部40は、当該表示部50と一体的にタッチパネルとして構成してもよい。
音声出力部55は、制御部100から入力される音声出力信号に従って、ビープ音やアラーム音を発生させて音声出力を行う。
The display unit 50 includes an LCD (Liquid Crystal Display), an ELD (Electro Luminescence Display), and the like, and performs various image display processes according to display control signals input from the control unit 100. The operation unit 40 may be configured as a touch panel integrally with the display unit 50.
The audio output unit 55 generates a beep sound or an alarm sound according to an audio output signal input from the control unit 100 and performs audio output.

2次記憶部60は、読み書き可能な不揮発性メモリであるEEPROM(Electrically Erasable Programmable ROM)やフラッシュメモリであり、制御部100からの制御信号に従って、ユーザにより設定されたシステムや各機能に関する設定データ,通信相手1bとの通信時に送受信するデータや同期処理実行時のデータなどの各種データを記憶・更新する。
電源部70は、端末装置1の各部に対して必要な電力供給を行う電源である。具体的には、電源部70は、図示は省略するが、電気エネルギーを生成する蓄電池、当該電気エネルギーを端末装置1の各部で必要とされる適切な電圧に変換するDC/DCコンバータ、等を含んで構成される。
The secondary storage unit 60 is an EEPROM (Electrically Erasable Programmable ROM), which is a readable / writable nonvolatile memory, or a flash memory. In accordance with a control signal from the control unit 100, setting data regarding a system and functions set by the user, Various data such as data transmitted / received during communication with the communication partner 1b and data during execution of synchronization processing are stored / updated.
The power supply unit 70 is a power supply that supplies necessary power to each unit of the terminal device 1. Specifically, although not shown, the power supply unit 70 includes a storage battery that generates electric energy, a DC / DC converter that converts the electric energy into an appropriate voltage required by each unit of the terminal device 1, and the like. Consists of including.

制御部100は、CPU(Central Processing Unit)110と、RAM(Random Access Memory)120と、ROM(Read Only Memory)130と、を含んで構成され、端末装置1の各部を統括制御するコンピュータとして機能する。   The control unit 100 includes a CPU (Central Processing Unit) 110, a RAM (Random Access Memory) 120, and a ROM (Read Only Memory) 130, and functions as a computer that controls each part of the terminal device 1. To do.

CPU110は、端末装置1の各部から入力される入力信号に応じて、ROM130に記憶された各種プログラム(プログラムコード)を実行するとともに、実行に係るプログラムに基づいて各部に出力信号を出力することにより、端末装置1の動作全般を統括制御する。具体的には、CPU110は、通信モジュール部10の駆動制御、操作部40が操作された際の各種操作信号に対する実行制御、表示部50を介した画像の表示制御、音声出力部55を介した音声出力制御などを行う。
RAM120は、CPU110によって実行される処理プログラムなどを展開するためのプログラム格納領域や、入力データや上記処理プログラムが実行される際に生じる処理結果などを一次的に格納するためのデータ格納領域などを備える。具体的には、RAM120は、CPU110が表示部50に表示制御するための文字列、CPU110が処理プログラムを実行する際に使用するフラグの現在値(0:正常値、−1:エラー値、1:通信終了値)、自機1aに現在設定されているモード(送信モード又は受信モード)、加速度センサ31にて検出された加速度及び角速度検出センサ32にて検出された角速度、等を記憶する。
The CPU 110 executes various programs (program codes) stored in the ROM 130 according to input signals input from the respective units of the terminal device 1 and outputs output signals to the respective units based on the programs related to the execution. The overall operation of the terminal device 1 is controlled. Specifically, the CPU 110 performs drive control of the communication module unit 10, execution control for various operation signals when the operation unit 40 is operated, image display control via the display unit 50, and audio output unit 55. Perform audio output control.
The RAM 120 has a program storage area for expanding a processing program executed by the CPU 110, a data storage area for temporarily storing input data and a processing result generated when the processing program is executed, and the like. Prepare. Specifically, the RAM 120 is a character string for the CPU 110 to display on the display unit 50, a current value of a flag used when the CPU 110 executes the processing program (0: normal value, -1: error value, 1 : Communication end value), the mode (transmission mode or reception mode) currently set in the own device 1a, the acceleration detected by the acceleration sensor 31, the angular velocity detected by the angular velocity detection sensor 32, and the like are stored.

ROM130は、例えば、端末装置1で実行可能なシステムプログラムや、当該システムプログラムで実行可能な各種処理プログラム、上記処理プログラムを実行する際に使用されるデータなどを記憶する。具体的には、ROM130は、表示部50や音声出力部55に出力する各種文字列や音声、通信処理内容に係る初期化処理の実行時の設定値、機能識別コードテーブル131と、動作パターンテーブル132と、端末装置1の属する通信グループを識別するためのグループ識別コードGと、通信相手検索プログラムと、姿勢/動作取得プログラムと、通信処理プログラムと、などを記憶する。   The ROM 130 stores, for example, a system program that can be executed by the terminal device 1, various processing programs that can be executed by the system program, and data that is used when the processing program is executed. Specifically, the ROM 130 includes various character strings and voices to be output to the display unit 50 and the voice output unit 55, setting values at the time of execution of initialization processing related to communication processing contents, a function identification code table 131, and an operation pattern table. 132, a group identification code G for identifying a communication group to which the terminal device 1 belongs, a communication partner search program, an attitude / motion acquisition program, a communication processing program, and the like are stored.

次に、ROM130に記憶された通信相手検索プログラム、姿勢/動作取得プログラムについて説明する。   Next, the communication partner search program and attitude / motion acquisition program stored in the ROM 130 will be described.

通信相手検索プログラムは、自機1aを通信相手1bとの通信時における送信側に設定するパターンと受信側に設定するパターンとをランダムな時間間隔で順次切換え、通信相手1bを検索する機能をCPU110に実行させるためのプログラムである。
具体的には、CPU110が通信相手検索プログラムを実行すると、図4に示すように、通信モジュール部10を介して、予めROM130に記憶されたランダム係数に基づくランダムな時間間隔で、送信モードに設定するパターンと受信モードに設定するパターンと、を順次切換える。そして、自機1aが送信モードで且つ通信相手1bが受信モードに設定されているタイミングT1や、自機1aが受信モードで且つ通信相手1bが送信モードに設定されているタイミングT2において、通信モジュール部10による応答要求信号及び応答信号の送受信が可能になるので、通信相手1bの検索が成功する(通信状態が確立される)こととなる。なお、上記ランダムな切換えにより自機1a及び通信相手1bに設定される送信モード/受信モードは、通信状態を確立するための一時設定であり、通信処理実行時において自機1a及び通信相手1bの何れを送信モード/受信モードとするかは、通信処理プログラムの実行時に決定される。
The communication partner search program sequentially switches between a pattern set on the transmitting side and a pattern set on the receiving side at the time of communication with the communication partner 1b by the own device 1a, and has a function of searching for the communication partner 1b. It is a program for making it run.
Specifically, when the CPU 110 executes the communication partner search program, the transmission mode is set at a random time interval based on a random coefficient stored in advance in the ROM 130 via the communication module unit 10 as shown in FIG. The pattern to be set and the pattern to be set to the reception mode are sequentially switched. At the timing T1 when the own device 1a is in the transmission mode and the communication partner 1b is set in the reception mode, and at the timing T2 when the own device 1a is in the reception mode and the communication partner 1b is set in the transmission mode, the communication module Since the response request signal and the response signal can be transmitted and received by the unit 10, the communication partner 1b is successfully searched (communication state is established). The transmission mode / reception mode set for the own device 1a and the communication partner 1b by the random switching is a temporary setting for establishing a communication state, and when the communication process is executed, the own device 1a and the communication partner 1b Which is set to the transmission mode / reception mode is determined when the communication processing program is executed.

姿勢/動作取得プログラムは、センサ部30より検出される端末装置1の加速度及び角速度に基づいて、端末装置1の姿勢/動作を取得する機能をCPU110に実行させるプログラムである。
具体的には、CPU110は、ユーザにより端末装置1が傾斜された状態で、角速度検出センサ32よりヨー方向,ローリング方向,ピッチング方向,それぞれの角速度を取得する。そして、CPU110は、当該角速度に基づいて、端末装置1の姿勢を姿勢変化量Θx,Θy,Θzとして導出する。この姿勢変化量は、例えば、Θの添え字以外の2軸(例えば、添え字がzの場合、XY軸)が形成する平面からの端末装置1の傾斜角(°)を表し、当該2軸回りそれぞれの傾斜角の平均等により取得する。具体的には、図5に示すように、Θzは、XY軸が形成する平面からの端末装置1の傾斜角であり、時計回りに(端末装置1が底面側から上面側に向かって)傾斜した場合を正方向(0°〜180°)、反時計回りに(端末装置1が上面側から底面側に向かって)傾斜した場合を負方向(0°〜−180°)とする。そのため、CPU110は、|90°|<Θz≦|180°|の範囲にあるときに端末装置1が下向きの姿勢、|0°|≦Θz<|90°|の範囲にあるときに端末装置1が上向きの姿勢、と判断できる。
次に、CPU110は上記特定(導出)した端末装置1の姿勢を基準として、ユーザにより端末装置1がX,Y,Z軸方向へ並進移動された又はヨー方向(Z軸回り)に回転された場合の加速度及び角速度を加速度センサ31及び角速度検出センサ32より取得する。そして、CPU110は、取得した加速度及び角速度に基づいて所定の演算処理を行い、上記特定した端末装置1の姿勢を基準とするX,Y,Z軸方向への並進移動した量を示す並進動作量Mx,My,Mz(m/s)及びヨー方向へ回転移動した量を示す回転動作量Mr(°/s)を端末装置1の動作として導出(取得)する。
The posture / motion acquisition program is a program that causes the CPU 110 to execute a function of acquiring the posture / motion of the terminal device 1 based on the acceleration and angular velocity of the terminal device 1 detected by the sensor unit 30.
Specifically, the CPU 110 acquires the respective angular velocities in the yaw direction, the rolling direction, and the pitching direction from the angular velocity detection sensor 32 in a state where the terminal device 1 is tilted by the user. Then, the CPU 110 derives the posture of the terminal device 1 as posture change amounts Θx, Θy, and Θz based on the angular velocity. This posture change amount represents, for example, the inclination angle (°) of the terminal device 1 from the plane formed by two axes other than the subscript Θ (for example, the XY axis when the subscript is z), and the two axes Acquired by the average of the inclination angle of each rotation. Specifically, as shown in FIG. 5, Θz is an inclination angle of the terminal device 1 from the plane formed by the XY axes, and is inclined clockwise (the terminal device 1 is inclined from the bottom surface side to the upper surface side). In this case, a positive direction (0 ° to 180 °) is assumed, and a case where the terminal device 1 is inclined counterclockwise (from the upper surface side toward the bottom surface side) is defined as a negative direction (0 ° to −180 °). Therefore, the CPU 110 determines that the terminal device 1 is in a downward posture when in the range of | 90 ° | <Θz ≦ | 180 ° |, and the terminal device 1 when in the range of | 0 ° | ≦ Θz <| 90 ° |. Can be judged as an upward-facing posture.
Next, the CPU 110 translates the terminal device 1 in the X, Y, and Z axis directions or rotates in the yaw direction (around the Z axis) based on the identified (derived) attitude of the terminal device 1. The acceleration and angular velocity in this case are acquired from the acceleration sensor 31 and the angular velocity detection sensor 32. Then, the CPU 110 performs a predetermined calculation process based on the acquired acceleration and angular velocity, and a translational operation amount indicating the amount of translational movement in the X, Y, and Z axis directions with reference to the attitude of the identified terminal device 1. Mx, My, Mz (m / s) and a rotational operation amount Mr (° / s) indicating the amount of rotational movement in the yaw direction are derived (acquired) as the operation of the terminal device 1.

次に、ROM130に記憶された機能識別コードテーブル131と、動作パターンテーブル132と、について説明する。   Next, the function identification code table 131 and the operation pattern table 132 stored in the ROM 130 will be described.

機能識別コードテーブル131は、図6の001〜111で示す複数の機能識別コードKを備えたテーブルである。
上記001〜111のそれぞれの機能識別コードKは、機能識別コードテーブル131の1段目及び2段目に示すように、端末装置1の姿勢に基づいて当該端末装置1を送信モードと受信モードの何れかに設定する処理をCPU110が実行するか否か、及び、端末装置1の動作に基づいて通信処理内容をCPU110が判断するか否か、により分類したコードである。
ここで、図6の2段目において、「自機・通信相手の両方」とは、自機1aと通信相手1bの双方の動作に基づいてCPU110が通信処理内容を判断することを指し、「自機1a・通信相手1bの片方のみ」とは、自機1aと通信相手1bの何れか一方(送信モードに設定された端末装置1)の動作に基づいてCPU110が通信処理内容を判断することを指す。
また、図6の3段目において、許容される動作識別コードAとは、001〜111の各機能識別コードKで許容される端末装置1の動作を識別するためのコードであり、4ビット(0000〜1111)にて表現される。ここで、先頭のビットは端末装置1をヨー方向に回転させる動作(回転動作量Mrに対応するZ軸回りに回転させる動作)、次のビットは端末装置1をZ軸方向に並進移動させる動作(並進動作量Mzに対応するZ軸方向に振る動作)、次のビットは端末装置1をY軸方向に並進移動させる動作(並進動作量Myに対応するY軸方向に振る動作)、末尾のビットは端末装置1をX軸方向に並進移動させる動作(並進動作量Mxに対応するX軸方向に振る動作)、をそれぞれ実行する/しない(ビット値:1/0)を表す。
そして、自機1aが通信相手1bと通信を行う際に、予めユーザが操作部40を介して、当該機能識別コードテーブル131に備わる機能識別コードKより一の機能識別コードKを指定するように構成される。なお、CPU110により、予め特定の機能識別コードKが指定されるように構成しても勿論よい。また、機能識別コードKは複数指定してもよく、全ての機能識別コードKを指定しても、敢えて機能を制限する等のために選択的に幾つか複数指定するとしてもよい。
The function identification code table 131 is a table including a plurality of function identification codes K indicated by 001 to 111 in FIG.
Each function identification code K of 001 to 111 indicates the terminal device 1 in the transmission mode and the reception mode based on the attitude of the terminal device 1, as shown in the first and second stages of the function identification code table 131. The codes are classified according to whether or not the CPU 110 executes processing to be set to any one and whether or not the CPU 110 determines the content of communication processing based on the operation of the terminal device 1.
Here, in the second row of FIG. 6, “both own device / communication partner” means that the CPU 110 determines the contents of communication processing based on the operations of both the own device 1a and the communication partner 1b. “Only one of the own device 1a / communication partner 1b” means that the CPU 110 determines the content of communication processing based on the operation of either one of the own device 1a or the communication partner 1b (the terminal device 1 set to the transmission mode). Point to.
In the third row of FIG. 6, the permitted operation identification code A is a code for identifying the operation of the terminal device 1 permitted by each function identification code K of 001 to 111, and is 4 bits ( 0000-1111). Here, the first bit is an operation to rotate the terminal device 1 in the yaw direction (an operation to rotate around the Z axis corresponding to the rotation operation amount Mr), and the next bit is an operation to translate the terminal device 1 in the Z axis direction. (Operation to swing in the Z-axis direction corresponding to the translation operation amount Mz), the next bit is an operation to translate the terminal device 1 in the Y-axis direction (operation to swing in the Y-axis direction corresponding to the translation operation amount My), The bit represents whether or not to perform the operation of moving the terminal device 1 in the X-axis direction (the operation of shaking in the X-axis direction corresponding to the translation operation amount Mx) (bit value: 1/0).
When the own device 1a communicates with the communication partner 1b, the user specifies in advance one function identification code K from the function identification code K provided in the function identification code table 131 via the operation unit 40. Composed. Of course, the CPU 110 may be configured to designate a specific function identification code K in advance. Also, a plurality of function identification codes K may be designated, or all of the function identification codes K may be designated, or a plurality of function identification codes K may be designated selectively for the purpose of limiting functions.

さらに、機能識別コードKと当該機能識別コードKにて許容される動作識別コードAの組み合わせ(動作パターン)、及び、ユーザによる端末装置1に対する傾斜や動作に基づいて、当該動作パターンが後述の通信処理プログラムの実行により特定された場合に行うCPU110の通信処理の内容と、が図7の動作パターンテーブル132に記載されている。なお、動作パターンテーブル132の動作識別コードAの欄に記載された動作(X,Y,Z,R)は、各々の動作識別コードAに係る動作の種類であり、それぞれ、X,Y,Z軸方向への並進移動動作,ヨー方向への回転移動動作を表す。   Further, based on the combination (operation pattern) of the function identification code K and the operation identification code A permitted by the function identification code K, and the inclination or operation of the terminal device 1 by the user, the operation pattern is communication described later. The contents of the communication processing of the CPU 110 performed when specified by the execution of the processing program are described in the operation pattern table 132 of FIG. The operations (X, Y, Z, R) described in the column of the operation identification code A of the operation pattern table 132 are the types of operations related to the respective operation identification codes A, and are respectively X, Y, Z. Represents translational movement in the axial direction and rotational movement in the yaw direction.

次に、当該動作パターンテーブル132の各段に該当する端末装置1の動作パターン1〜11を図8及び図9の(i)〜(xi)に例示する。ここで、図8及び図9の(i)〜(xi)に示す矢印は端末装置1のX,Y,Z軸方向への並進移動,ヨー方向への回転移動を表す。
また、図9(vii)及び(viii)を除く図8及び図9の(i)〜(xi)において、便宜上送信モードに設定された端末装置1を自機1a、受信モードに設定された端末装置1を通信相手1b、としている。つまり、図8(i)〜(vi)の動作パターン1〜6のように、端末装置1の姿勢にて端末装置1を送信モードと受信モードの何れかに設定する処理を行う場合(機能識別コードKが001〜011の場合)、CPU110は、下向きの姿勢にある(上方にある)端末装置1を送信モード,上向きの姿勢にある(下方にある)端末装置1を受信モードと判断する。
一方、CPU110は、端末装置1の姿勢にて端末装置1を送信モードと受信モードの何れかに設定する処理を行わない場合、機能識別コードKが111に係る、図9(ix)〜(xi)の動作パターン9〜11のように、ユーザによる端末装置1の並進移動動作や回転動作が行われる側の端末装置1を送信モード、停止状態にある端末装置1を受信モードと設定する。また、図9(vii)の動作パターン7のように、機能識別コードKが110且つ動作識別コードAが0010において、通信処理内容がデータの同期であり、自機1aと通信相手1bの何れが送信モードでも受信モードでもよい場合、CPU110は、通信相手検索プログラムの実行時に設定した送信モード/受信モードを自機1aと通信相手1bに用いる。加えて、図9(viii)の動作パターン8のように、機能識別コードKが110且つ動作識別コードAが0100の場合、CPU110は、自機1aから見たZ軸方向への並進移動が正(Z(+))である場合、自機1aを送信モード及び通信相手1bを受信モード、自機1aから見たZ軸方向への並進移動が負(Z(−))である場合、自機1aを受信モード及び通信相手1bを送信モード、と判断する。
Next, the operation patterns 1 to 11 of the terminal device 1 corresponding to each stage of the operation pattern table 132 are illustrated in FIGS. 8 and 9 (i) to (xi). Here, the arrows shown in (i) to (xi) of FIGS. 8 and 9 represent translational movement of the terminal device 1 in the X, Y, and Z axis directions and rotational movement in the yaw direction.
Further, in FIG. 8 and FIG. 9 (i) to (xi) excluding FIG. 9 (vii) and (viii), the terminal device 1 set to the transmission mode for convenience is the terminal 1a and the terminal set to the reception mode. The apparatus 1 is a communication partner 1b. That is, when processing for setting the terminal device 1 to either the transmission mode or the reception mode is performed in the attitude of the terminal device 1 as in the operation patterns 1 to 6 of FIGS. 8 (i) to (vi) (function identification). When the code K is 001 to 011), the CPU 110 determines that the terminal device 1 in the downward posture (upward) is the transmission mode and the terminal device 1 in the upward posture (downward) is the reception mode.
On the other hand, when the CPU 110 does not perform the process of setting the terminal device 1 to one of the transmission mode and the reception mode in the attitude of the terminal device 1, the function identification code K is 111, which corresponds to FIG. ), The terminal device 1 on the side where the user performs the translational movement operation and the rotation operation of the terminal device 1 is set as the transmission mode, and the terminal device 1 in the stopped state is set as the reception mode. 9 (vii), when the function identification code K is 110 and the operation identification code A is 0010, the communication processing content is data synchronization, and either the own device 1a or the communication partner 1b is When the transmission mode or the reception mode may be used, the CPU 110 uses the transmission mode / reception mode set when the communication partner search program is executed for the own device 1a and the communication partner 1b. In addition, when the function identification code K is 110 and the operation identification code A is 0100 as shown in the operation pattern 8 in FIG. 9 (viii), the CPU 110 correctly translates in the Z-axis direction as viewed from the own device 1a. If (Z (+)), the own device 1a is in the transmission mode, the communication partner 1b is in the receiving mode, and the translation in the Z-axis direction viewed from the own device 1a is negative (Z (-)) It is determined that the machine 1a is in the reception mode and the communication partner 1b is in the transmission mode.

なお、動作パターンテーブル132の密着/近接の欄は、図8及び図9の(i)〜(xi)に例示されるように、各動作パターン1〜11が、自機1aと通信相手1bとが密着した状態(密着状態)で実現されるか近接した状態(近接状態)で実現されるかを表している。
具体的に、密着状態とは、例えば、自機1aの姿勢変化量Θx,Θy,Θz(Θxa,Θya,Θza)と、通信相手1bの姿勢変化量Θx,Θy,Θz(Θxb,Θyb,Θzb)と、の間で、||Θxa|−90°|=||Θxb|−90°|,||Θya|−90°|=||Θyb|−90°|,||Θza|−90°|=||Θzb|−90°|が成立している場合をいう。当該密着状態が成立している場合の自機1aと通信相手1bの位置関係及び姿勢変化量を、図10の密着形式1〜4に例示する。また、近接状態とは、自機1aの姿勢変化量と通信相手1bの姿勢変化量とが、密着状態における自機1a及び通信相手1b各々の姿勢変化量に予め定めた所定値を増減させた値以下の範囲(許容範囲)内にある状態をいう。一例として、当該所定値を15°とした場合の近接状態における自機1aと通信相手1bの位置関係及び姿勢変化量を、図11の近接形式1〜4に例示する。
In the contact / proximity column of the operation pattern table 132, as illustrated in FIGS. 8 and 9 (i) to (xi), each operation pattern 1 to 11 is assigned to the own device 1a and the communication partner 1b. Is realized in a close contact state (close contact state) or in a close state (proximity state).
Specifically, the close contact state is, for example, the posture change amounts Θx, Θy, Θz (Θxa, Θya, Θza) of the own device 1a and the posture change amounts Θx, Θy, Θz (Θxb, Θyb, Θzb) of the communication partner 1b. ) || Θxa | −90 ° | = || Θxb | −90 ° |, || Θya | −90 ° | = || Θyb | −90 ° |, || Θza | −90 ° This is a case where | = || Θzb | −90 ° | The positional relationship and posture change amount between the own device 1a and the communication partner 1b in the case where the contact state is established are illustrated in contact types 1 to 4 in FIG. In the proximity state, the posture change amount of the own device 1a and the posture change amount of the communication partner 1b are increased or decreased by a predetermined value in the posture change amount of each of the own device 1a and the communication partner 1b in the close contact state. A state that is within the range (allowable range) below the value. As an example, the proximity formats 1 to 4 in FIG. 11 illustrate the positional relationship and the posture change amount between the own device 1a and the communication partner 1b in the proximity state when the predetermined value is 15 °.

次に、ROM130に記憶された通信処理プログラムについて説明する。   Next, the communication processing program stored in the ROM 130 will be described.

通信処理プログラムは、センサ部30により検出される端末装置1の姿勢や動作に基づいて動作パターンを特定し、当該特定した動作パターンに応じた通信処理内容にて通信相手1bと通信させる機能をCPU110に実行させるプログラムである。
具体的には、CPU110は、ユーザにより端末装置1が傾斜され、X,Y,Z軸方向へ並進移動やヨー方向(Z軸回り)へ回転されると、姿勢/動作取得プログラムの実行により、センサ部30より検出される端末装置1の加速度及び角速度に基づいて、姿勢変化量Θx,Θy,Θz、及び動作量(並進動作量Mx,My,Mz,回転動作量Mr)を取得する。
そして、CPU110は、予め指定された動作識別コードKが110又は111の場合、上述のように、取得された並進動作量Mx,My,Mz,回転動作量Mrに基づいて、当該端末装置1を送信モードと受信モードの何れかに設定し、動作識別コードKが001〜011の場合、姿勢変化量Θzに基づいて端末装置1が上向きの姿勢であるか下向きの姿勢であるかを判断することで、当該端末装置1を送信モードと受信モードの何れかに設定する。
さらに、CPU110は、例えば、回転動作量Mrが予め定めた回転動作量Dr(°/s)を上回るか否か(つまり、上記基準とする端末装置1の姿勢より予め定めた時間内に予め定めた量以上の回転を行っているか否か)を判断し、回転動作量Mrが回転動作量Dr以上の場合に、ヨー方向への回転動作がユーザになされたと判断する。加えて、CPU110は、回転動作がユーザになされていないと判断した場合、並進動作量Mx,My,Mzの絶対値の中で最大値をとるものを特定することで、XYZ軸方向の何れかの方向への並進移動動作がユーザになされたと判断する。そして、CPU110は、当該判断結果に基づいて、0000〜1111の中から一の動作識別コードAを特定する。
次に、CPU110は、動作パターンテーブル132を参照し、動作パターン1〜11の中から当該特定した動作識別コードAと予め指定された機能識別コードKとの組み合わせに該当する動作パターンを特定する。そして、CPU110は、特定した動作パターンに該当する通信処理内容を抽出し、通信モジュール部10を介して当該通信処理内容に応じた通信処理信号を送受信することで通信相手1bとの通信を行う。なお、動作パターン2,3,7,8の場合、自機1aが送信モードに設定されると、CPU110は、通信相手1bより当該通信相手1bの動作量を通信モジュール部10を介して取得し、自機1aの動作量及び通信相手1bの動作量の双方に基づいて(つまり、双方の動作量の差異が予め定められた所定値以下である場合に)動作パターンの特定を行う。また、動作パターン4〜6,9〜11の場合、通信相手1bより当該通信相手1bの動作量を通信モジュール部10を介して取得し、通信相手1bの動作量に基づいて当該通信相手1bが停止状態(つまり、並進動作量Mx,My,Mz,回転動作量Mrが全て予め定められた所定値以下である)と判断されると、自機1aの動作量に基づいて動作パターンの特定を行う。
The communication processing program specifies an operation pattern based on the attitude and operation of the terminal device 1 detected by the sensor unit 30, and has a function of communicating with the communication partner 1b with communication processing content corresponding to the specified operation pattern. This is a program to be executed.
Specifically, when the terminal device 1 is tilted by the user and translated in the X, Y, and Z axis directions and rotated in the yaw direction (around the Z axis), the CPU 110 executes the posture / motion acquisition program, Based on the acceleration and angular velocity of the terminal device 1 detected by the sensor unit 30, the posture change amounts Θx, Θy, Θz and the motion amounts (translation motion amounts Mx, My, Mz, rotation motion amount Mr) are acquired.
Then, when the motion identification code K designated in advance is 110 or 111, the CPU 110 determines the terminal device 1 based on the acquired translational motion amounts Mx, My, Mz and the rotational motion amount Mr as described above. When either the transmission mode or the reception mode is set and the operation identification code K is 001 to 011, it is determined whether the terminal device 1 is in the upward posture or the downward posture based on the posture change amount Θz. Then, the terminal device 1 is set to either the transmission mode or the reception mode.
Further, for example, the CPU 110 determines in advance whether or not the rotational operation amount Mr exceeds a predetermined rotational operation amount Dr (° / s) (that is, within a predetermined time from the attitude of the terminal device 1 as the reference). Whether or not the rotation operation is greater than or equal to the rotation amount), and if the rotation operation amount Mr is greater than or equal to the rotation operation amount Dr, it is determined that the user has performed the rotation operation in the yaw direction. In addition, when the CPU 110 determines that the rotation operation is not performed by the user, the CPU 110 identifies one of the absolute values of the translational operation amounts Mx, My, and Mz that is the maximum value, and thus any one of the XYZ axis directions. It is determined that the user has performed a translational movement in the direction of. Then, the CPU 110 specifies one operation identification code A from 0000 to 1111 based on the determination result.
Next, the CPU 110 refers to the operation pattern table 132 and identifies an operation pattern corresponding to the combination of the identified operation identification code A and the function identification code K designated in advance from the operation patterns 1 to 11. Then, the CPU 110 extracts the communication processing content corresponding to the identified operation pattern, and communicates with the communication partner 1b by transmitting and receiving a communication processing signal corresponding to the communication processing content via the communication module unit 10. In the case of operation patterns 2, 3, 7, and 8, when the own device 1a is set to the transmission mode, the CPU 110 acquires the operation amount of the communication partner 1b from the communication partner 1b via the communication module unit 10. The operation pattern is specified based on both the operation amount of the own device 1a and the operation amount of the communication partner 1b (that is, when the difference between both operation amounts is equal to or less than a predetermined value). In the case of the operation patterns 4 to 6 and 9 to 11, the operation amount of the communication partner 1b is acquired from the communication partner 1b via the communication module unit 10, and the communication partner 1b is determined based on the operation amount of the communication partner 1b. When it is determined that the vehicle is stopped (that is, the translational motion amounts Mx, My, Mz, and the rotational motion amount Mr are all equal to or less than a predetermined value), the motion pattern is specified based on the motion amount of the own device 1a. Do.

「通信状態確立処理」
次に、本実施形態に係る端末装置1による通信状態確立処理について図12のフローチャートを用いて説明する。
"Communication state establishment process"
Next, communication state establishment processing by the terminal device 1 according to the present embodiment will be described with reference to the flowchart of FIG.

まず、ユーザが操作部40を介して通信開始操作を行うと、CPU110は通信相手検索プログラムを実行し、自機1aを送信モードに設定する(ステップS1)。
次いで、CPU110は、通信モジュール部10を介して応答要求信号を送信し、受信モードに設定された通信相手1bを検索する(ステップS2)。
次いで、CPU110は、受信モードに設定された通信相手1bより応答処理信号を受信したか否かにより通信相手1bの検索に成功したか否かを判断し(ステップS3)、通信相手1bの検索に成功したと判断した場合(ステップS3;Yes)、ステップS9の処理へ移行する。
一方で、CPU110は、ステップS3にて通信相手1bの検索に成功していないと判断した場合(ステップS3;No)、受信モードへの切換えのタイミングか否かを判断し(ステップS4)、切換えのタイミングでないと判断した場合(ステップS4;No)、ステップS3以降の処理を繰り返す。
First, when the user performs a communication start operation via the operation unit 40, the CPU 110 executes the communication partner search program and sets the own device 1a to the transmission mode (step S1).
Next, the CPU 110 transmits a response request signal via the communication module unit 10 and searches for the communication partner 1b set in the reception mode (step S2).
Next, the CPU 110 determines whether or not the search for the communication partner 1b has been successful based on whether or not the response processing signal has been received from the communication partner 1b set to the reception mode (step S3). If it is determined that the process has succeeded (step S3; Yes), the process proceeds to step S9.
On the other hand, if the CPU 110 determines in step S3 that the search for the communication partner 1b has not been successful (step S3; No), it determines whether it is the timing for switching to the reception mode (step S4). If it is determined that the timing is not reached (step S4; No), the processing after step S3 is repeated.

次いで、CPU110は、ステップS4にて受信モードへの切換えのタイミングであると判断した場合(ステップS4;Yes)、自機1aを受信モードに設定する(ステップS5)。
次いで、CPU110は、通信モジュール部10を介して応答要求信号を受信可能な状態にして、送信モードに設定された通信相手1bを検索する(ステップS6)。
次いで、CPU110は、送信モードに設定された通信相手1bより応答要求信号を受信したか否かにより通信相手1bの検索に成功したか否かを判断し(ステップS7)、通信相手1bの検索に成功したと判断した場合(ステップS7;Yes)、当該通信相手1bへ応答信号を送信し、ステップS9の処理へ移行する。
一方で、CPU110は、ステップS7にて通信相手1bの検索に成功していないと判断した場合(ステップS7;No)、送信モードへの切換えのタイミングか否かを判断し(ステップS8)、切換えのタイミングでないと判断した場合(ステップS8;No)、ステップS7以降の処理を繰り返す。また、CPU110は、ステップS8にて切換えのタイミングであると判断した場合(ステップS8;Yes)、ステップS1以降の処理を繰り返す。
Next, when CPU 110 determines in step S4 that it is the timing for switching to the reception mode (step S4; Yes), CPU 110a sets own device 1a to the reception mode (step S5).
Next, the CPU 110 makes a response request signal receivable via the communication module unit 10 and searches for the communication partner 1b set in the transmission mode (step S6).
Next, the CPU 110 determines whether or not the search for the communication partner 1b has been successful based on whether or not a response request signal has been received from the communication partner 1b set to the transmission mode (step S7). If it is determined that the process has succeeded (step S7; Yes), a response signal is transmitted to the communication partner 1b, and the process proceeds to step S9.
On the other hand, if the CPU 110 determines in step S7 that the search for the communication partner 1b has not been successful (step S7; No), it determines whether it is the timing for switching to the transmission mode (step S8). If it is determined that the timing is not reached (step S8; No), the processing after step S7 is repeated. On the other hand, when CPU 110 determines that it is the switching timing in step S8 (step S8; Yes), it repeats the processes in and after step S1.

そして、ステップS3又はステップS7にて通信相手1bの検索に成功したと判断した場合(ステップS3;Yes、ステップS7;Yes)、ステップS1にて設定された送信モード又はステップS5にて設定された受信モードを、自機1aの一時的な現在のモードとして決定し(ステップS9)、本処理を終了する。   If it is determined in step S3 or step S7 that the communication partner 1b has been successfully searched (step S3; Yes, step S7; Yes), the transmission mode set in step S1 or set in step S5 is set. The reception mode is determined as the temporary current mode of the own device 1a (step S9), and this process is terminated.

「機能確認処理」
次に、本実施形態に係る端末装置1による機能確認処理について図13(i)(ii)のフローチャートを用いて説明する。ここで、図13(i)は、通信状態確立処理にて自機1aが送信モード(通信相手1bが受信モード)に一時的に設定されている場合の処理を、図13(ii)は、通信状態確立処理にて自機1aが受信モード(通信相手1bが送信モード)に一時的に設定されている場合の処理を、それぞれ示す。なお、以下の説明で、添え字sが付されたものは送信モード側であることを、添え字rが付されたものは受信モード側であることを、便宜的に示す。
"Function confirmation process"
Next, function confirmation processing by the terminal device 1 according to the present embodiment will be described with reference to the flowcharts of FIGS. 13 (i) and (ii). Here, FIG. 13 (i) shows the process when the own device 1a is temporarily set to the transmission mode (the communication partner 1b is the reception mode) in the communication state establishment process, and FIG. The processing when the own device 1a is temporarily set to the reception mode (the communication partner 1b is the transmission mode) in the communication state establishment processing is shown respectively. In the following description, for convenience, it is indicated that the one with the subscript s is on the transmission mode side, and the one with the subscript r is on the reception mode side.

(送信モードの処理)
まず、図13(i)に示すように、ユーザが操作部40を介して、機能識別コードテーブル131の中から一の機能識別コードKsを指定し、動作識別コードAs(当該指定した機能識別コードKsで許容される動作識別コードAsの何れか)を選択すると、CPU110は、ROM130より自機1aのグループ識別コードGsを取得し、機能識別コードKsと動作識別コードAsとグループ識別コードGsとで構成されるコード列KsAsGsの設定を行う(ステップS21)。
なお、機能識別コードKsはユーザが指定/入力する場合に限られず、CPU110が予め指定された機能識別コードKsを機能識別コードテーブル131より抽出する構成であっても勿論よい。
(Transmission mode processing)
First, as shown in FIG. 13 (i), the user designates one function identification code Ks from the function identification code table 131 via the operation unit 40, and the operation identification code As (the designated function identification code). When one of the operation identification codes As allowed by Ks) is selected, the CPU 110 acquires the group identification code Gs of the own device 1a from the ROM 130, and the function identification code Ks, the operation identification code As, and the group identification code Gs. The code string KsAsGs to be configured is set (step S21).
It should be noted that the function identification code Ks is not limited to the case where the user designates / inputs, but the CPU 110 may of course be configured to extract the function identification code Ks designated in advance from the function identification code table 131.

次いで、CPU110は、通信モジュール部10を介してステップS1にて設定したコード列KsAsGsを受信モードの通信相手1bに送信する(ステップS22)。
次いで、CPU110は、後述するステップS50にて受信モードの通信相手1bより送信されるコード列KrArGr(受信モードの通信相手1bに設定されたコード列)が受信できたか否かを判断し(ステップS23)、受信できていないと判断する場合(ステップS23;No)、受信されるまで待機する。
一方で、CPU110は、ステップS23にて受信できたと判断した場合(ステップS23;Yes)、グループ識別コードGsとグループ識別コードGrが一致するか否かを判断する(ステップS24)。
Next, the CPU 110 transmits the code string KsAsGs set in step S1 to the communication partner 1b in the reception mode via the communication module unit 10 (step S22).
Next, the CPU 110 determines whether or not the code string KrArGr (the code string set for the communication partner 1b in the reception mode) received from the communication partner 1b in the reception mode can be received in step S50 described later (step S23). ), When it is determined that it has not been received (step S23; No), it waits until it is received.
On the other hand, when CPU 110 determines that it has been received in step S23 (step S23; Yes), CPU 110 determines whether or not group identification code Gs matches group identification code Gr (step S24).

そして、CPU110は、ステップS24にて一致しないと判断した場合(ステップS24;No)、音声出力部55を介してエラー音を出力し(ステップS25)、自機1aと通信相手1bとでグループが相違する旨を表示部50にてエラー画面として表示し(ステップS26)、ステップS30の処理へ移行する。
一方で、CPU110は、ステップS24にて一致すると判断した場合(ステップS24;Yes)、機能識別コードKs及び動作識別コードAsと、機能識別コードKr及び動作識別コードArと、が一致するか否かを判断する(ステップS27)。そして、CPU110は、ステップS27にて一致しないと判断した場合(ステップS27;No)、音声出力部55を介してエラー音を出力し(ステップS28)、自機1aと通信相手1bとで機能又は動作が相違する旨を表示部50にてエラー画面として表示する(ステップS29)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS30)、本処理を終了し再び「通信状態確立処理」を実行する。
また、CPU110は、ステップS27にて一致すると判断した場合(ステップS27;Yes)、音声出力部55を介して通信開始のメロディ音を出力し(ステップS31)、通信開始の旨を表示部50にて表示し(ステップS32)、フラグを正常状態を表す0に設定し(ステップS33)、本処理を終了する。
If the CPU 110 determines that they do not match at step S24 (step S24; No), the CPU 110 outputs an error sound via the voice output unit 55 (step S25), and the group is established between the own device 1a and the communication partner 1b. The difference is displayed on the display unit 50 as an error screen (step S26), and the process proceeds to step S30.
On the other hand, if the CPU 110 determines in step S24 that they match (step S24; Yes), whether or not the function identification code Ks and the operation identification code As match the function identification code Kr and the operation identification code Ar. Is determined (step S27). If the CPU 110 determines that they do not match in step S27 (step S27; No), the CPU 110 outputs an error sound via the voice output unit 55 (step S28), and functions or operates between the own device 1a and the communication partner 1b. A message indicating that the operation is different is displayed on the display unit 50 as an error screen (step S29). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S30), the CPU 110 ends the process and executes the “communication state establishment process” again.
If CPU 110 determines that they match in step S27 (step S27; Yes), it outputs a melody sound for starting communication via voice output unit 55 (step S31) and informs display unit 50 that communication is started. Are displayed (step S32), the flag is set to 0 representing the normal state (step S33), and this process is terminated.

(受信モードの処理)
まず、図13(ii)に示すように、CPU110は、ステップS22にて送信されるコード列KsAsGsを受信出来たか否かを判断し(ステップS41)、受信出来ていないと判断した場合(ステップS41;No)、受信されるまで待機する。
一方で、CPU110は、ステップS41にて受信出来たと判断した場合(ステップS41;Yes)、ROM130より自機1aのグループ識別コードGrを取得し、グループ識別コードGsと一致するか否かを判断する(ステップS42)。
(Reception mode processing)
First, as shown in FIG. 13 (ii), the CPU 110 determines whether or not the code string KsAsGs transmitted in step S22 has been received (step S41), and determines that it has not been received (step S41). No), wait until it is received.
On the other hand, if the CPU 110 determines that it has been received in step S41 (step S41; Yes), it acquires the group identification code Gr of its own device 1a from the ROM 130, and determines whether or not it matches the group identification code Gs. (Step S42).

そして、CPU110は、ステップS42にて一致すると判断した場合(ステップS42;Yes)、機能識別コードテーブル131の中から機能識別コードKsに一致する機能識別コードKrが存在するか否かを判断し、且つ、一致する機能識別コードKrが存在する場合に、機能識別コードKrで許容される動作識別コードArに動作識別コードAsと一致するものが存在するか否かを判断することで、KsAsと一致するKrArが存在するか否かを判断する(ステップS43)。
次いで、CPU110は、ステップS43にてKsAsと一致するKrArが存在すると判断する場合(ステップS43;Yes)、ステップS42にて一致すると判断したグループ識別コードGr及びステップS43にて一致すると判断したKrArにより、コード列KrArGrを生成する(ステップS44)。そして、CPU110は、フラグを正常状態を表す0に設定し(ステップS45)、ステップS50の処理へ移行する。
一方で、CPU110は、ステップS43にてKsAsと一致するKrArが存在しないと判断する場合(ステップS43;No)、KrArにエラー値を代入してコード列KrArGr(GrはGsに一致する値)を生成する(ステップS46)。そして、CPU110は、フラグをエラー状態を表す−1に設定し(ステップS47)、ステップS50の処理へ移行する。
When the CPU 110 determines that they match in step S42 (step S42; Yes), the CPU 110 determines whether or not there is a function identification code Kr that matches the function identification code Ks from the function identification code table 131. In addition, when there is a function identification code Kr that matches, the operation identification code Ar allowed by the function identification code Kr is determined whether or not there is a match with the operation identification code As, thereby matching the KsAs. It is determined whether or not KrAr to be present exists (step S43).
Next, when it is determined that there is a KrAr that matches KsAs in Step S43 (Step S43; Yes), the CPU 110 uses the group identification code Gr determined to match in Step S42 and the KrAr determined to match in Step S43. The code string KrArGr is generated (step S44). Then, the CPU 110 sets the flag to 0 representing the normal state (step S45), and proceeds to the process of step S50.
On the other hand, if the CPU 110 determines in step S43 that there is no KrAr that matches KsAs (step S43; No), the CPU 110 assigns an error value to KrAr and sets the code string KrArGr (Gr is a value that matches Gs). Generate (step S46). Then, the CPU 110 sets the flag to −1 representing an error state (step S47), and proceeds to the process of step S50.

次いで、CPU110は、ステップS42にて一致しないと判断した場合(ステップS42;No)、KrArGrにエラー値を代入してコード列KrArGrを生成する(ステップS48)。そして、CPU110は、フラグをエラー状態を表す−1に設定する(ステップS49)。
次いで、CPU110は、ステップS44,S46,S48にて生成したコード列KrArGrを送信モードの通信相手1bに送信する(ステップS50)。次いで、CPU110は、フラグが0であるか否かを判断し(ステップS51)、フラグが0でないと判断した場合(ステップS51;No)、音声出力部55を介してエラー音を出力し(ステップS52)、エラー状態にある旨を一定時間表示部50にてエラー画面として表示する(ステップS53)。そして、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS54)、本処理を終了し再び「通信状態確立処理」を実行する。一方で、CPU110は、フラグが0であると判断した場合(ステップS51;Yes)、通信開始の旨を表示部50にて表示し(ステップS55)、本処理を終了する。
Next, if the CPU 110 determines that they do not match in step S42 (step S42; No), the CPU 110 generates a code string KrArGr by assigning an error value to KrArGr (step S48). Then, the CPU 110 sets a flag to −1 representing an error state (step S49).
Next, the CPU 110 transmits the code string KrArGr generated in steps S44, S46, and S48 to the communication partner 1b in the transmission mode (step S50). Next, the CPU 110 determines whether or not the flag is 0 (step S51). If the CPU 110 determines that the flag is not 0 (step S51; No), the CPU 110 outputs an error sound via the audio output unit 55 (step S51). S52) The fact that there is an error is displayed as an error screen on the display unit 50 for a certain period of time (step S53). Then, after a certain period of time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S54), the present process is terminated and the “communication state establishment process” is executed again. On the other hand, when the CPU 110 determines that the flag is 0 (step S51; Yes), the display unit 50 displays the start of communication (step S55), and ends this process.

なお、ステップS27やステップS43では、機能識別コードKsと機能識別コードKrとが完全に一致することを判断条件としているが、図14に示すように、CPU110が、機能識別コードKsと機能識別コードKrとが相違する場合でも、何れか一方の機能識別コードの値に準じて機能識別コードKsと機能識別コードKrとが一致すると判断するような構成としてもよい。   Note that in step S27 and step S43, the determination condition is that the function identification code Ks and the function identification code Kr are completely matched. However, as shown in FIG. 14, the CPU 110 uses the function identification code Ks and the function identification code. Even when Kr is different, a configuration may be adopted in which it is determined that the function identification code Ks and the function identification code Kr match in accordance with the value of one of the function identification codes.

「通信実行処理」
次に、本実施形態に係る端末装置1による通信実行処理について図15のフローチャートを用いて説明する。
"Communication execution process"
Next, communication execution processing by the terminal device 1 according to the present embodiment will be described with reference to the flowchart of FIG.

まず、CPU110は、現在設定されているフラグが0であるか否かを判断し(ステップS101)、0でない(フラグがエラー状態を示す−1や通信終了状態を示す1である)と判断した場合(ステップS101;No)、本処理を終了する。
一方で、CPU110は、ステップS101にて0であると判断した場合(ステップS101;Yes)、機能識別コードKの1桁目が0であるか否かを判断(つまり、端末装置1の姿勢に基づいて送信モードと受信モードの何れかに設定する処理をCPU110が実行するか否かを判断)する(ステップS102)。
そして、CPU110は、ステップS102にて機能識別コードKの1桁目が0でないと判断した場合(ステップS102;No)、後述する「第2動作判断処理」を実行し(ステップS103)、ステップS101以降の処理を繰り返す。
一方で、CPU110は、ステップS102にて機能識別コードKの1桁目が0であると判断した場合(ステップS102;Yes)、姿勢/動作取得プログラムの実行により自機1aの姿勢変化量Θx,Θy,Θzを取得する(ステップS104)。
次いで、CPU110は、ステップS9にて決定された現在のモードが送信モードか否かを判断する(ステップS105)。
First, the CPU 110 determines whether or not the currently set flag is 0 (step S101), and determines that it is not 0 (the flag is -1 indicating an error state or 1 indicating a communication end state). In the case (step S101; No), this process is terminated.
On the other hand, if the CPU 110 determines that it is 0 in step S101 (step S101; Yes), it determines whether or not the first digit of the function identification code K is 0 (that is, the attitude of the terminal device 1). Based on this, it is determined whether or not the CPU 110 executes processing for setting either the transmission mode or the reception mode (step S102).
If the CPU 110 determines in step S102 that the first digit of the function identification code K is not 0 (step S102; No), the CPU 110 executes a “second operation determination process” described later (step S103). The subsequent processing is repeated.
On the other hand, if the CPU 110 determines in step S102 that the first digit of the function identification code K is 0 (step S102; Yes), the posture change amount Θx, Θy and Θz are acquired (step S104).
Next, CPU 110 determines whether or not the current mode determined in step S9 is a transmission mode (step S105).

次いで、CPU110は、ステップS105にて現在のモードが送信モードと判断した場合(ステップS105;Yes)、受信モードの通信相手1bより当該通信相手1bの姿勢変化量Θx,Θy,Θzを通信モジュール部10を介して取得する(ステップS106)。
次いで、CPU110は、ステップS104にて取得した自機1aの姿勢変化量Θx,Θy,Θzと、ステップS106にて取得した通信相手1bの姿勢変化量Θx,Θy,Θzと、を比較し(ステップS107)、比較結果の差異が許容範囲内にあるか否かを判断する(ステップS108)。
そして、CPU110は、ステップS108にて許容範囲内に無いと判断した場合(ステップS108;No)、音声出力部55を介してエラー音を出力し(ステップS109)、自機1aと通信相手1bとの姿勢が許容範囲内に無い旨を表示部50にてエラー画面として表示する(ステップS110)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS111)、本処理を終了し、再び「通信状態確立処理」を実行する。
Next, when the CPU 110 determines that the current mode is the transmission mode in step S105 (step S105; Yes), the communication module unit obtains the posture change amounts Θx, Θy, and Θz of the communication partner 1b from the communication partner 1b in the reception mode. 10 (step S106).
Next, the CPU 110 compares the posture change amounts Θx, Θy, Θz of the own device 1a acquired in step S104 with the posture change amounts Θx, Θy, Θz of the communication partner 1b acquired in step S106 (step S106). S107), it is determined whether or not the difference between the comparison results is within an allowable range (step S108).
If the CPU 110 determines that it is not within the allowable range in step S108 (step S108; No), the CPU 110 outputs an error sound via the voice output unit 55 (step S109), and the own device 1a and the communication partner 1b are connected. Is displayed on the display unit 50 as an error screen (step S110). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S111), the CPU 110 ends the process and executes the “communication state establishment process” again. .

一方で、CPU110は、ステップS108にて許容範囲内にあると判断した場合(ステップS108;Yes)、自機1aの姿勢変化量Θzが90°<|Θz|≦180°の範囲(下向きの姿勢)にあり、且つ、通信相手1bの姿勢変化量Θzが0°≦|Θz|<90°の範囲(上向きの姿勢)にあるか否かを判断する(ステップS112)。
そして、CPU110は、ステップS112にて自機1aが下向きの姿勢且つ通信相手1bが上向きの姿勢にあると判断した場合(ステップS112;Yes)、自機1aを送信モードに確定し(ステップS113)、通信相手1bへ受信モードに確定させるための指示信号を送信する(ステップS114)。次いで、CPU110は、後述する「第1動作判断処理」(ステップS115)及び「送信モード処理」(ステップS116)を実行し、ステップS101以降の処理を繰り返す。
On the other hand, if the CPU 110 determines that it is within the allowable range in step S108 (step S108; Yes), the attitude change amount Θz of the own machine 1a is in the range of 90 ° <| Θz | ≦ 180 ° (downward posture). ) And the posture change amount Θz of the communication partner 1b is in the range of 0 ° ≦ | Θz | <90 ° (upward posture) (step S112).
If the CPU 110 determines in step S112 that the own device 1a is in the downward posture and the communication partner 1b is in the upward posture (step S112; Yes), the own device 1a is determined in the transmission mode (step S113). Then, an instruction signal for confirming the reception mode is transmitted to the communication partner 1b (step S114). Next, the CPU 110 executes “first operation determination processing” (step S115) and “transmission mode processing” (step S116), which will be described later, and repeats the processing after step S101.

一方で、CPU110は、ステップS112にて自機1a及び通信相手1bの姿勢変化量Θzが上記範囲に無いと判断した場合(ステップS112;No)、自機1aの姿勢変化量Θzが0°≦|Θz|<90°の範囲(上向きの姿勢)にあり、且つ、通信相手1bの姿勢変化量Θzが90°≦|Θz|<180°の範囲(下向きの姿勢)にあるか否かを判断する(ステップS117)。
そして、ステップS117にて自機1a及び通信相手1bの姿勢変化量Θzが上記範囲にあると判断した場合(ステップS117;Yes)、通信相手1bへ送信モードに切換えさせるための指示信号を送信し(ステップS118)、自機1aを受信モードに切換える処理を実行する(ステップS119)。次いで、CPU110は、後述する「第1動作判断処理」(ステップS120)及び「受信モード処理」(ステップS121)を実行し、ステップS101以降の処理を繰り返す。
また、ステップS117にて自機1a及び通信相手1bの姿勢変化量Θzが上記範囲に無いと判断した場合(ステップS117;No)、音声出力部55を介してエラー音を出力し(ステップS122)、自機1aと通信相手1bとの姿勢により送信/受信モードが判断できない旨を表示部50にてエラー画面として表示する(ステップS123)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS124)、本処理を終了し、再び「通信状態確立処理」を実行する。
On the other hand, when the CPU 110 determines in step S112 that the posture change amount Θz of the own device 1a and the communication partner 1b is not in the above range (step S112; No), the posture change amount Θz of the own device 1a is 0 ° ≦ It is determined whether or not the range of | Θz | <90 ° (upward posture) and the posture change amount Θz of the communication partner 1b are in the range of 90 ° ≦ | Θz | <180 ° (downward posture). (Step S117).
When it is determined in step S117 that the attitude change amount Θz of the own device 1a and the communication partner 1b is within the above range (step S117; Yes), an instruction signal for switching to the transmission mode is transmitted to the communication partner 1b. (Step S118), a process of switching the own device 1a to the reception mode is executed (Step S119). Next, the CPU 110 executes “first operation determination processing” (step S120) and “reception mode processing” (step S121), which will be described later, and repeats the processing after step S101.
If it is determined in step S117 that the attitude change amount Θz of the own device 1a and the communication partner 1b is not within the above range (step S117; No), an error sound is output via the audio output unit 55 (step S122). Then, the display unit 50 displays an error screen indicating that the transmission / reception mode cannot be determined based on the attitudes of the own device 1a and the communication partner 1b (step S123). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S124), the CPU 110 ends the process and executes the “communication state establishment process” again. .

次いで、CPU110は、ステップS105にて現在のモードが送信モードでない(受信モードである)と判断した場合(ステップS105;No)、送信モードの通信相手1bへ自機1aの姿勢変化量Θx,Θy,Θzを通信モジュール部10を介して送信する(ステップS125)。
次いで、CPU110は、通信相手1bより受信モードに確定の指示信号を受信したか否かを判断する(ステップS126)。
そして、CPU110は、ステップS126にて指示信号を受信したと判断する場合(ステップS126;Yes)、後述する「第1動作判断処理」(ステップS127)及び「受信モード処理」(ステップS128)を実行し、ステップS101以降の処理を繰り返す。
一方で、CPU110は、ステップS126にて指示信号を受信していないと判断する場合(ステップS126;No)、送信モードに切換えさせるための指示信号の受信を待って、自機1aを送信モードに切換える処理を実行する(ステップS129)。そして、CPU110は、後述する「第1動作判断処理」(ステップS130)及び「送信モード処理」(ステップS131)を実行し、ステップS101以降の処理を繰り返す。
Next, when the CPU 110 determines in step S105 that the current mode is not the transmission mode (the reception mode) (step S105; No), the attitude change amount Θx, Θy of the own device 1a to the communication partner 1b in the transmission mode. , Θz are transmitted via the communication module unit 10 (step S125).
Next, CPU 110 determines whether or not an instruction signal confirming the reception mode is received from communication partner 1b (step S126).
If the CPU 110 determines that the instruction signal has been received in step S126 (step S126; Yes), the CPU 110 executes “first operation determination processing” (step S127) and “reception mode processing” (step S128) described later. Then, the processing after step S101 is repeated.
On the other hand, when CPU 110 determines in step S126 that the instruction signal has not been received (step S126; No), CPU 110 waits for the reception of the instruction signal for switching to the transmission mode, and sets own apparatus 1a to the transmission mode. A switching process is executed (step S129). Then, the CPU 110 executes “first operation determination processing” (step S130) and “transmission mode processing” (step S131), which will be described later, and repeats the processing after step S101.

「第1動作判断処理」
次に、本実施形態に係る端末装置1による第1動作判断処理について図16及び図17のフローチャートを用いて説明する。
"First motion judgment process"
Next, the first operation determination process by the terminal device 1 according to the present embodiment will be described with reference to the flowcharts of FIGS. 16 and 17.

まず、CPU110は、機能識別コードKが001であるか否かを判断し(ステップS201)、001であると判断した場合(ステップS201;Yes)、自機1aが送信モードであるか否かを判断する(ステップS202)。そして、CPU110は、ステップS202にて送信モードであると判断した場合(ステップS202;Yes)、動作パターン1の通信処理内容で通信処理信号を生成し(ステップS203)、本処理を終了する。また、CPU110は、ステップS202にて送信モードでない(受信モードである)と判断した場合(ステップS202;No)、本処理を終了する。   First, the CPU 110 determines whether or not the function identification code K is 001 (step S201). If the CPU 110 determines that the function identification code K is 001 (step S201; Yes), the CPU 110 determines whether or not the own device 1a is in the transmission mode. Judgment is made (step S202). If the CPU 110 determines that the transmission mode is selected in step S202 (step S202; Yes), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 1 (step S203), and ends this processing. If CPU 110 determines in step S202 that the mode is not the transmission mode (the reception mode) (step S202; No), the process ends.

次いで、CPU110は、ステップS201にて機能識別コードKが001でないと判断した場合(ステップS201;No)、機能識別コードKが010であるか否かを判断し(ステップS204)、010であると判断した場合(ステップS204;Yes)、自機1aの動作量(並進動作量Mx,My,Mz、回転動作量Mr)を取得する(ステップS205)。   Next, when the CPU 110 determines in step S201 that the function identification code K is not 001 (step S201; No), the CPU 110 determines whether or not the function identification code K is 010 (step S204). If it is determined (step S204; Yes), the operation amount (translation operation amount Mx, My, Mz, rotation operation amount Mr) of the own machine 1a is acquired (step S205).

次いで、CPU110は、自機1aが送信モードであるか否かを判断する(ステップS206)。そして、CPU110は、ステップS206にて送信モードであると判断した場合(ステップS206;Yes)、通信相手1bより当該通信相手1bの動作量(並進動作量Mx,My,Mz、回転動作量Mr)を取得する(ステップS207)。   Next, the CPU 110 determines whether or not the own device 1a is in the transmission mode (step S206). If the CPU 110 determines that the transmission mode is selected in step S206 (step S206; Yes), the operation amount of the communication partner 1b (translation operation amount Mx, My, Mz, rotation operation amount Mr) from the communication partner 1b. Is acquired (step S207).

次いで、CPU110は、自機1aの動作量と通信相手1bの動作量とを比較し(ステップS208)、比較結果の差異が予め定められた許容範囲以内か否か(自機1aと通信相手1bが同じ動作を行っているか否か)を判断する(ステップS209)。そして、CPU110は、ステップS209にて許容範囲以上と判断した場合(ステップS209;No)、ステップS205以降の処理を繰り返す。一方で、CPU110は、ステップS209にて許容範囲以内と判断した場合(ステップS209;Yes)、回転動作量|Mr|が予め定めた回転動作量Drを上回るか否かを判断する(ステップS210)。
そして、CPU110は、ステップS210にて上回ると判断した場合(ステップS210;Yes)、動作パターン3の通信処理内容で通信処理信号を生成し(ステップS211)、本処理を終了する。
一方で、CPU110は、ステップS210にて下回ると判断した場合(ステップS210;No)、並進動作量|Mx|,|My|,|Mz|中で最大値をとるものが並進動作量|Mx|であるか否かを判断する(ステップS212)。
そして、CPU110は、ステップS212にて並進動作量|Mx|であると判断した場合(ステップS212;Yes)、動作パターン2の通信処理内容で通信処理信号を生成し(ステップS213)、本処理を終了する。
一方で、CPU110は、ステップS212にて並進動作量|Mx|でないと判断した場合(ステップS212;No)、音声出力部55を介してエラー音を出力し(ステップS214)、動作パターンが特定できない旨を表示部50にてエラー画面として表示する(ステップS215)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS216)、本処理を終了し、再び「通信状態確立処理」を実行する。
Next, the CPU 110 compares the operation amount of the own device 1a with the operation amount of the communication partner 1b (step S208), and determines whether or not the difference between the comparison results is within a predetermined allowable range (the own device 1a and the communication partner 1b). (Whether or not are performing the same operation) (step S209). And CPU110 repeats the process after step S205, when it is judged that it is beyond an allowable range in step S209 (step S209; No). On the other hand, when CPU 110 determines that the value is within the allowable range in step S209 (step S209; Yes), CPU 110 determines whether or not the rotational operation amount | Mr | exceeds a predetermined rotational operation amount Dr (step S210). .
If the CPU 110 determines that the value exceeds the value in step S210 (step S210; Yes), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 3 (step S211), and ends this processing.
On the other hand, if the CPU 110 determines that the value is lower in step S210 (step S210; No), the translation operation amount | Mx | that takes the maximum value among the translation operation amounts | Mx |, | My |, | Mz | It is determined whether or not (step S212).
If the CPU 110 determines that the translational movement amount | Mx | is satisfied in step S212 (step S212; Yes), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 2 (step S213), and performs this processing. finish.
On the other hand, if the CPU 110 determines that the translation motion amount | Mx | is not satisfied in step S212 (step S212; No), the CPU 110 outputs an error sound via the voice output unit 55 (step S214), and the operation pattern cannot be specified. A message to that effect is displayed on the display unit 50 as an error screen (step S215). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S216), the CPU 110 ends the process and executes the “communication state establishment process” again. .

次いで、CPU110は、ステップS206にて自機1aが送信モードでない(受信モードである)と判断した場合(ステップS206;No)、通信相手1bへ自機1aの動作量を送信し(ステップS217)、本処理を終了する。   Next, when it is determined in step S206 that the own device 1a is not in the transmission mode (reception mode) (step S206; No), the CPU 110 transmits the operation amount of the own device 1a to the communication partner 1b (step S217). This process is terminated.

次いで、CPU110は、ステップS204にて機能識別コードKが010でない(011である)と判断した場合(ステップS204;No)、自機1aの動作量を取得する(ステップS218)。   Next, when the CPU 110 determines in step S204 that the function identification code K is not 010 (011) (step S204; No), the CPU 110 acquires the operation amount of the own device 1a (step S218).

次いで、CPU110は、自機1aが送信モードであるか否かを判断する(ステップS219)。そして、CPU110は、ステップS219にて送信モードであると判断した場合(ステップS219;Yes)、通信相手1bより当該通信相手1bの動作量を取得し(ステップS220)、通信相手1bの動作量(並進動作量Mx,My,Mz、回転動作量Mr)が全て予め定められた所定値以下であるか否か(つまり、通信相手1bが停止状態にあるか否か)を判断する(ステップS221)。そして、CPU110は、ステップS221にて所定値以下でないと判断した場合(ステップS221;No)、ステップS228以降の処理へ進む。
一方で、CPU110は、ステップS221にて所定値以下であると判断した場合(ステップS221;Yes)、自機1aの回転動作量|Mr|が予め定めた回転動作量Drを上回るか否かを判断する(ステップS222)。
次いで、CPU110は、ステップS222にて上回ると判断した場合(ステップS222;Yes)、動作パターン6の通信処理内容で通信処理信号を生成し(ステップS223)、本処理を終了する。
一方で、CPU110は、ステップS222にて下回ると判断した場合(ステップS222;No)、並進動作量|Mx|,|My|,|Mz|の絶対値の中で最大値をとるものを判断する(ステップS224)。
そして、CPU110は、ステップS224にて並進動作量|Mx|であると判断した場合(ステップS224;1.|Mx|)、動作パターン4の通信処理内容で通信処理信号を生成し(ステップS225)、本処理を終了する。一方、CPU110は、ステップS224にて並進動作量|My|であると判断した場合(ステップS224;2.|My|)、動作パターン5の通信処理内容で通信処理信号を生成し(ステップS226)、本処理を終了する。さらに、CPU110は、ステップS224にて並進動作量|Mz|であると判断した場合(ステップS224;3.|Mz|)、ステップS228以降の処理へ移行する。
Next, the CPU 110 determines whether or not the own device 1a is in the transmission mode (step S219). If the CPU 110 determines that the transmission mode is set in step S219 (step S219; Yes), the CPU 110 acquires the operation amount of the communication partner 1b from the communication partner 1b (step S220), and the operation amount of the communication partner 1b ( It is determined whether or not the translational motion amounts Mx, My, Mz, and the rotational motion amount Mr) are all equal to or less than a predetermined value (that is, whether or not the communication partner 1b is in a stopped state) (step S221). . If the CPU 110 determines in step S221 that it is not less than or equal to the predetermined value (step S221; No), the process proceeds to step S228 and subsequent steps.
On the other hand, if the CPU 110 determines in step S221 that it is equal to or less than the predetermined value (step S221; Yes), it determines whether or not the rotational operation amount | Mr | of the own device 1a exceeds a predetermined rotational operation amount Dr. Judgment is made (step S222).
Next, when the CPU 110 determines that the value exceeds the value in Step S222 (Step S222; Yes), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 6 (Step S223), and ends this processing.
On the other hand, if the CPU 110 determines that the value is lower in Step S222 (Step S222; No), the CPU 110 determines the absolute value of the translational motion amounts | Mx |, | My |, | Mz | (Step S224).
If the CPU 110 determines that the translational movement amount | Mx | is satisfied in step S224 (step S224; 1. | Mx |), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 4 (step S225). This process is terminated. On the other hand, if the CPU 110 determines in step S224 that the translational motion amount is | My | (step S224; 2. | My |), it generates a communication processing signal with the communication processing content of the operation pattern 5 (step S226). This process is terminated. Further, when CPU 110 determines in step S224 that the translational movement amount is | Mz | (step S224; 3. | Mz |), the process proceeds to step S228 and subsequent steps.

次いで、CPU110は、ステップS219にて受信モードであると判断した場合(ステップS219;No)、自機1aの動作量が全て予め定められた所定値以下であるか否か(つまり、自機1aが停止状態にあるか否か)を判断する(ステップS227)。そして、CPU110は、ステップS227にて全て予め定められた所定値以下であると判断した場合(ステップS227;Yes)、自機1aが停止状態であるとして本処理を終了する。一方、CPU110は、ステップS227にて全て予め定められた所定値以下でないと判断した場合(ステップS227;No)、音声出力部55を介してエラー音を出力し(ステップS228)、動作パターンが特定できない旨を表示部50にて表示する(ステップS229)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS230)、本処理を終了し、再び「通信状態確立処理」を実行する。   Next, when the CPU 110 determines that the reception mode is set in step S219 (step S219; No), whether or not all the operation amounts of the own device 1a are equal to or less than a predetermined value (that is, the own device 1a). Whether or not is in a stopped state) is determined (step S227). If the CPU 110 determines in step S227 that all the values are equal to or smaller than a predetermined value (step S227; Yes), the CPU 110 ends the process assuming that the own device 1a is in a stopped state. On the other hand, if the CPU 110 determines in step S227 that all are not less than the predetermined value (step S227; No), an error sound is output via the audio output unit 55 (step S228), and the operation pattern is specified. The fact that it cannot be displayed is displayed on the display unit 50 (step S229). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S230), the CPU 110 ends this process and executes the “communication state establishment process” again. .

「送信モード処理」
次に、本実施形態に係る端末装置1による送信モード(イニシエータモード)処理について図18のフローチャートを用いて説明する。
"Send Mode Processing"
Next, transmission mode (initiator mode) processing by the terminal device 1 according to the present embodiment will be described with reference to the flowchart of FIG.

まず、CPU110は、受信モードの通信相手1bに対して通信処理信号を送信する(ステップS301)。
次いで、CPU110は、ステップS301にて送信した通信処理信号に対する応答処理信号を通信相手1bより受信したか否かを判断する(ステップS302)。
First, the CPU 110 transmits a communication processing signal to the communication partner 1b in the reception mode (step S301).
Next, CPU 110 determines whether or not a response processing signal for the communication processing signal transmitted in step S301 has been received from communication partner 1b (step S302).

そして、CPU110は、ステップS302にて受信したと判断した場合(ステップS302;Yes)、フラグを通信終了状態を示す1に設定し(ステップS303)、応答処理信号を解析して通信が成功しているか否かを判断する(ステップS304)。   If the CPU 110 determines that it has been received in step S302 (step S302; Yes), it sets the flag to 1 indicating the communication end state (step S303), analyzes the response processing signal, and succeeds in communication. It is determined whether or not (step S304).

次いで、CPU110は、ステップS304にて通信が成功したと判断する場合(ステップS304;Yes)、音声出力部55を介して通信正常終了のメロディ音を出力し(ステップS305)、通信正常終了の旨を表示部50にて表示し(ステップS306)、本処理を終了する。一方で、CPU110は、ステップS304にて通信が失敗したと判断する場合(ステップS304;No)、ステップS308以降の処理へ移行する。   Next, when the CPU 110 determines that the communication is successful in step S304 (step S304; Yes), the CPU 110 outputs a melody sound indicating the normal completion of communication via the audio output unit 55 (step S305), and indicates that the communication is normally completed. Is displayed on the display unit 50 (step S306), and this process is terminated. On the other hand, when CPU 110 determines that communication has failed in step S304 (step S304; No), the process proceeds to step S308 and subsequent steps.

一方で、CPU110は、ステップS302にて受信していないと判断した場合(ステップS302;No)、ステップS301に係る通信処理信号の送信の開始より所定時間が経過し、タイムアウト状態であるか否かを判断する(ステップS307)。そして、CPU110は、ステップS307にてタイムアウト状態でないと判断した場合(ステップS307;No)、ステップS302以降の処理を繰り返す。一方で、CPU110は、ステップS307にてタイムアウト状態であると判断した場合(ステップS307;Yes)、音声出力部55を介してエラー音を出力し(ステップS308)、通信エラーが発生した旨を表示部50にてエラー画面として表示する(ステップS309)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS310)、本処理を終了し、再び「通信状態確立処理」を実行する。   On the other hand, when CPU 110 determines that it has not been received in step S302 (step S302; No), it is determined whether a predetermined time has elapsed from the start of transmission of the communication processing signal according to step S301, and whether or not a time-out state has occurred. Is determined (step S307). If the CPU 110 determines in step S307 that it is not a timeout state (step S307; No), it repeats the processing from step S302. On the other hand, if the CPU 110 determines in step S307 that it is in the timeout state (step S307; Yes), it outputs an error sound via the audio output unit 55 (step S308) and displays that a communication error has occurred. The error screen is displayed on the unit 50 (step S309). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S310), the CPU 110 ends the process and executes the “communication state establishment process” again. .

「受信モード処理」
次に、本実施形態に係る端末装置1による受信モード(ターゲットモード)処理について図19のフローチャートを用いて説明する。
"Receive mode processing"
Next, reception mode (target mode) processing by the terminal device 1 according to the present embodiment will be described with reference to the flowchart of FIG.

まず、CPU110は、送信モードの通信相手1bより通信処理信号を受信したか否かを判断する(ステップS401)。
そして、CPU110は、ステップS401にて受信したと判断した場合(ステップS401;Yes)、フラグを通信終了状態を示す1に設定し(ステップS402)、通信処理信号を解析して通信が成功しているか否かを判断する(ステップS403)。
First, the CPU 110 determines whether or not a communication processing signal has been received from the communication partner 1b in the transmission mode (step S401).
If the CPU 110 determines that it has been received in step S401 (step S401; Yes), it sets the flag to 1 indicating the communication end state (step S402), analyzes the communication processing signal, and succeeds in communication. It is determined whether or not there is (step S403).

次いで、CPU110は、ステップS403にて通信が成功したと判断する場合(ステップS403;Yes)、通信正常終了の応答処理信号を生成して通信相手1bに送信し(ステップS404)、本処理を終了する。一方で、CPU110は、ステップS403にて通信が失敗したと判断する場合(ステップS403;No)、ステップS406以降の処理へ移行する。   Next, when the CPU 110 determines that the communication is successful in step S403 (step S403; Yes), the CPU 110 generates a response processing signal for normal communication termination and transmits it to the communication partner 1b (step S404), and ends this processing. To do. On the other hand, when the CPU 110 determines that communication has failed in step S403 (step S403; No), the CPU 110 proceeds to processing after step S406.

一方で、CPU110は、ステップS401にて受信していないと判断した場合(ステップS401;No)、通信処理信号の受信の開始より所定時間が経過し、タイムアウト状態であるか否かを判断する(ステップS405)。そして、CPU110は、ステップS405にてタイムアウト状態でないと判断した場合(ステップS405;No)、ステップS401以降の処理を繰り返す。一方で、CPU110は、ステップS405にてタイムアウト状態であると判断した場合(ステップS405;Yes)、異常終了の応答処理信号を生成して通信相手1bに送信し(ステップS406)、再び「通信状態確立処理」を実行する。   On the other hand, when CPU 110 determines that it has not been received in step S401 (step S401; No), CPU 110 determines whether or not a predetermined time has elapsed from the start of reception of the communication processing signal and is in a timeout state ( Step S405). If the CPU 110 determines that the time-out state is not reached in step S405 (step S405; No), the CPU 110 repeats the processing after step S401. On the other hand, if the CPU 110 determines in step S405 that it is in the timeout state (step S405; Yes), it generates a response processing signal for abnormal termination and transmits it to the communication partner 1b (step S406). "Establish process" is executed.

「第2動作判断処理」
次に、本実施形態に係る端末装置1による第2動作判断処理について図20及び図21のフローチャートを用いて説明する。
"Second motion determination process"
Next, the second operation determination process by the terminal device 1 according to the present embodiment will be described with reference to the flowcharts of FIGS.

まず、CPU110は、機能識別コードKが110であるか否かを判断し(ステップS501)、110であると判断した場合(ステップS501;Yes)、自機1aの動作量(並進動作量Mx,My,Mz、回転動作量Mr)を取得する(ステップS502)。
次いで、CPU110は、自機1aが送信モードであるか否かを判断する(ステップS503)。そして、CPU110は、ステップS503にて送信モードであると判断した場合(ステップS503;Yes)、通信相手1bより当該通信相手1bの動作量を取得する(ステップS504)。
First, the CPU 110 determines whether or not the function identification code K is 110 (step S501). If it is determined that the function identification code K is 110 (step S501; Yes), the operation amount (translation operation amount Mx, (My, Mz, rotational movement amount Mr) is acquired (step S502).
Next, the CPU 110 determines whether or not the own device 1a is in the transmission mode (step S503). If the CPU 110 determines that the transmission mode is set in step S503 (step S503; Yes), the CPU 110 acquires the operation amount of the communication partner 1b from the communication partner 1b (step S504).

次いで、CPU110は、自機1aの動作量と通信相手1bの動作量とを比較し(ステップS505)、比較結果の差異が予め定められた許容範囲以内か否か(自機1aと通信相手1bが同じ動作を行っているか否か)を判断する(ステップS506)。そして、CPU110は、ステップS506にて許容範囲以上と判断した場合(ステップS506;No)、ステップS502以降の処理を繰り返す。一方で、CPU110は、ステップS506にて許容範囲以内と判断した場合(ステップS506;Yes)、自機1aの回転動作量|Mr|が予め定めた回転動作量Drを上回るか否かを判断する(ステップS507)。
そして、CPU110は、ステップS507にて上回ると判断した場合(ステップS507;Yes)、ステップS509以降の処理を実行する。
Next, the CPU 110 compares the operation amount of the own device 1a with the operation amount of the communication partner 1b (step S505), and whether or not the difference in the comparison result is within a predetermined allowable range (the own device 1a and the communication partner 1b). (Whether or not are performing the same operation) (step S506). If the CPU 110 determines that the allowable range is exceeded in step S506 (step S506; No), the CPU 110 repeats the processing from step S502. On the other hand, when CPU 110 determines that the value is within the allowable range in step S506 (step S506; Yes), CPU 110 determines whether or not rotation amount | Mr | of own device 1a exceeds a predetermined rotation amount Dr. (Step S507).
If the CPU 110 determines that the value exceeds the value in Step S507 (Step S507; Yes), the CPU 110 executes the processing after Step S509.

一方で、CPU110は、ステップS507にて下回ると判断した場合(ステップS507;No)、並進動作量|Mx|,|My|,|Mz|の絶対値の中で最大値をとるものを判断する(ステップS508)。
そして、CPU110は、ステップS508にて並進動作量|Mx|であると判断した場合(ステップS508;1.|Mx|)、音声出力部55を介してエラー音を出力し(ステップS509)、動作パターンが特定できない旨をエラー画面として表示部50にて表示する(ステップS510)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS511)、本処理を終了し、再び「通信状態確立処理」を実行する。
On the other hand, when CPU 110 determines that the value is lower in step S507 (step S507; No), CPU 110 determines which of the absolute values of translational motion amounts | Mx |, | My |, | Mz | (Step S508).
If the CPU 110 determines in step S508 that the translational movement amount is | Mx | (step S508; 1. | Mx |), the CPU 110 outputs an error sound via the audio output unit 55 (step S509). An indication that the pattern cannot be specified is displayed on the display unit 50 as an error screen (step S510). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S511), the CPU 110 ends this process and executes the “communication state establishment process” again. .

一方、CPU110は、ステップS508にて並進動作量|My|であると判断した場合(ステップS508;2.|My|)、動作パターン7の通信処理内容で通信処理信号を生成し(ステップS512)、ステップS515以降の処理を実行する。
また、CPU110は、ステップS508にて並進動作量|Mz|であると判断した場合(ステップS508;3.Mz)、並進動作量Mzが正の値であるか否か(つまり、自機1aが通信相手1b側へ向かう動作を行っているか否か)を判断する(ステップS513)。
On the other hand, if the CPU 110 determines that the translation motion amount | My | is determined in step S508 (step S508; 2. | My |), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 7 (step S512). Then, the processing after step S515 is executed.
If CPU 110 determines in step S508 that translational motion amount | Mz | is satisfied (step S508; 3.Mz), whether or not translational motion amount Mz is a positive value (that is, own device 1a It is determined whether or not an operation toward the communication partner 1b is being performed (step S513).

そして、CPU110は、ステップS513にて並進動作量Mzが正の値と判断した場合(ステップS513;Yes)、動作パターン8の通信処理内容で通信処理信号を生成し(ステップS514)、「送信モード処理」を実行して(ステップS515)、本処理を終了する。   When the CPU 110 determines that the translational motion amount Mz is a positive value in step S513 (step S513; Yes), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 8 (step S514). "Process" is executed (step S515), and this process ends.

一方で、CPU110は、ステップS513にて並進動作量Mzが負の値と判断した場合(ステップS513;No)、通信相手1bへ送信モードに切換えさせるための指示信号を送信し(ステップS516)、自機1aを受信モードに切換える処理を実行する(ステップS517)。次いで、CPU110は、「受信モード処理」を実行して(ステップS518)、本処理を終了する。   On the other hand, when the CPU 110 determines that the translation operation amount Mz is a negative value in Step S513 (Step S513; No), the CPU 110 transmits an instruction signal for switching to the transmission mode to the communication partner 1b (Step S516). Processing for switching own device 1a to the reception mode is executed (step S517). Next, the CPU 110 executes “reception mode processing” (step S518), and ends this processing.

次いで、CPU110は、ステップS503にて送信モードでない(受信モードである)と判断した場合(ステップS503;No)、通信相手1bへ自機1aの動作量を送信する(ステップS519)。
そして、CPU110は、通信相手1bより送信モードへの切換えの指示信号を受信したか否かを判断し(ステップS520)、受信していないと判断した場合(ステップS520;No)、「受信モード処理」を実行して(ステップS521)、本処理を終了する。
一方で、CPU110は、ステップS520にて受信したと判断した場合(ステップS520;Yes)、自機1aを送信モードに切換える処理を実行する(ステップS522)。
そして、CPU110は、動作パターン8の通信処理内容で通信処理信号を生成し(ステップS523)、「送信モード処理」を実行して(ステップS524)、本処理を終了する。
Next, when it is determined in step S503 that the transmission mode is not set (reception mode is set) (step S503; No), the CPU 110 transmits the operation amount of the own device 1a to the communication partner 1b (step S519).
Then, the CPU 110 determines whether or not an instruction signal for switching to the transmission mode has been received from the communication partner 1b (step S520). When it is determined that the signal has not been received (step S520; No), the “reception mode processing” "Is executed (step S521), and this process is terminated.
On the other hand, when CPU 110 determines that it has been received in step S520 (step S520; Yes), CPU 110 executes processing for switching own device 1a to the transmission mode (step S522).
Then, the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 8 (step S523), executes the “transmission mode processing” (step S524), and ends this processing.

次いで、CPU110は、機能識別コードKが110でない(111である)と判断した場合(ステップS501;No)、自機1aの動作量(並進動作量Mx,My,Mz、回転動作量Mr)を取得する(ステップS525)。
次いで、CPU110は、自機1aが送信モードであるか否かを判断する(ステップS526)。そして、CPU110は、ステップS526にて送信モードであると判断した場合(ステップS526;Yes)、通信相手1bより当該通信相手1bの動作量を取得する(ステップS527)。
Next, when the CPU 110 determines that the function identification code K is not 110 (111) (step S501; No), the operation amount of the own device 1a (translation operation amounts Mx, My, Mz, rotation operation amount Mr) is determined. Obtain (step S525).
Next, the CPU 110 determines whether or not the own device 1a is in the transmission mode (step S526). If the CPU 110 determines that the transmission mode is set in step S526 (step S526; Yes), the CPU 110 acquires the operation amount of the communication partner 1b from the communication partner 1b (step S527).

次いで、CPU110は、自機1aの動作量と通信相手1bの動作量とを比較し(ステップS528)、動作量(並進動作量Mx,My,Mz、回転動作量Mr)が全て予め定められた所定値以下であるのが自機1aか通信相手1bかを判断(つまり、自機1aと通信相手1bとで何れが停止状態にあるのか)を判断する(ステップS529)。
そして、CPU110は、ステップS529にて自機1a及び通信相手1bの何れでもないと判断した場合(ステップS529;1.何れでもない)、音声出力部55を介してエラー音を出力し(ステップS530)、動作パターンが特定できない旨を表示部50にてエラー画面として表示する(ステップS531)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS532)、本処理を終了し、再び「通信状態確立処理」を実行する。
また、CPU110は、ステップS529にて自機1aであると判断した場合(ステップS529;2.自機)、通信相手1bへ送信モードに切換えさせるための指示信号を送信し(ステップS533)、自機1aを受信モードに切換える処理を実行する(ステップS534)。次いで、CPU110は、「受信モード処理」を実行して(ステップS535)、本処理を終了する。
さらに、CPU110は、ステップS529にて通信相手1bであると判断した場合(ステップS529;3.通信相手)、ステップS539以降の処理に移行する。
Next, the CPU 110 compares the operation amount of the own device 1a with the operation amount of the communication partner 1b (step S528), and all the operation amounts (translation operation amounts Mx, My, Mz, rotation operation amount Mr) are predetermined. It is determined whether the own device 1a or the communication partner 1b is equal to or less than the predetermined value (that is, which of the own device 1a and the communication partner 1b is in a stopped state) (step S529).
When the CPU 110 determines that it is neither the own device 1a nor the communication partner 1b in step S529 (step S529; 1. neither), the CPU 110 outputs an error sound via the audio output unit 55 (step S530). ) The fact that the operation pattern cannot be specified is displayed on the display unit 50 as an error screen (step S531). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S532), the CPU 110 ends this process and executes the “communication state establishment process” again. .
If CPU 110 determines that it is its own device 1a in step S529 (step S529; 2. own device), it transmits an instruction signal for switching to the transmission mode to communication partner 1b (step S533). A process of switching the machine 1a to the reception mode is executed (step S534). Next, the CPU 110 executes “reception mode processing” (step S535), and ends this processing.
Further, when CPU 110 determines in step S529 that it is communication partner 1b (step S529; 3. communication partner), the process proceeds to step S539 and subsequent steps.

次いで、CPU110は、ステップS526にて送信モードでない(受信モードである)と判断した場合(ステップS526;No)、通信相手1bに自機1aの動作量を送信する(ステップS536)。
次いで、CPU110は、通信相手1bより受信モードに切換えの指示信号を受信したか否かを判断する(ステップS537)。そして、CPU110は、ステップS537にて受信したと判断する場合(ステップS537;Yes)、自機1aを送信モードに切換える処理を実行する(ステップS538)。
次いで、CPU110は、自機1aの回転動作量|Mr|が予め定めた回転動作量Drを上回るか否かを判断し(ステップS539)、上回ると判断した場合(ステップS539;Yes)、動作パターン9の通信処理内容で通信処理信号を生成し(ステップS540)、ステップS544の処理へ以降する。
Next, when it is determined in step S526 that the transmission mode is not set (reception mode is set) (step S526; No), the CPU 110 transmits the operation amount of the own device 1a to the communication partner 1b (step S536).
Next, CPU 110 determines whether or not an instruction signal for switching to the reception mode is received from communication partner 1b (step S537). Then, when CPU 110 determines that it has been received in step S537 (step S537; Yes), CPU 110 executes processing for switching own device 1a to the transmission mode (step S538).
Next, the CPU 110 determines whether or not the rotational motion amount | Mr | of the own device 1a exceeds a predetermined rotational motion amount Dr (step S539). If it is determined that the rotational motion amount | Mr | exceeds the predetermined rotational motion amount Dr (step S539; Yes), the operation pattern A communication processing signal is generated with the communication processing content of step 9 (step S540), and the process proceeds to step S544.

次いで、CPU110は、ステップS539にて下回ると判断した場合(ステップS539;No)、並進動作量|Mx|,|My|,|Mz|の中で最大値をとるものを判断する(ステップS541)。
そして、CPU110は、ステップS541にて並進動作量|Mx|であると判断した場合(ステップS541;1.|Mx|)、動作パターン10の通信処理内容で通信処理信号を生成し(ステップS542)、ステップS544の処理へ以降する。また、CPU110は、ステップS541にて並進動作量|My|であると判断した場合(ステップS541;2.|My|)、動作パターン11の通信処理内容で通信処理信号を生成し(ステップS543)、「送信モード処理」を実行して(ステップS544)、本処理を終了する。
さらに、CPU110は、ステップS541にて並進動作量|Mz|であると判断した場合(ステップS541;3.|Mz|)、音声出力部55を介してエラー音を出力し(ステップS545)、動作パターンが特定できない旨を表示部50にてエラー画面として表示する(ステップS546)。そして、CPU110は、一定時間が経過又はユーザにより操作部40を介してエラー状態の解除の操作が行われた後(ステップS547)、本処理を終了し、再び「通信状態確立処理」を実行する。
Next, when the CPU 110 determines that the value is lower in step S539 (step S539; No), the CPU 110 determines which of the translational motion amounts | Mx |, | My |, | Mz | takes the maximum value (step S541). .
If the CPU 110 determines in step S541 that the translational motion amount is | Mx | (step S541; 1. | Mx |), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 10 (step S542). Then, the process proceeds to step S544. On the other hand, if the CPU 110 determines in step S541 that the translational motion amount is | My | (step S541; 2. | My |), the CPU 110 generates a communication processing signal with the communication processing content of the operation pattern 11 (step S543). Then, the “transmission mode process” is executed (step S544), and this process ends.
Further, when the CPU 110 determines in step S541 that the translational movement amount is | Mz | (step S541; 3. | Mz |), the CPU 110 outputs an error sound via the audio output unit 55 (step S545). The fact that the pattern cannot be specified is displayed on the display unit 50 as an error screen (step S546). Then, after a predetermined time has elapsed or the user has performed an operation for canceling the error state via the operation unit 40 (step S547), the CPU 110 ends this process and executes the “communication state establishment process” again. .

また、CPU110は、ステップS537にて受信していないと判断する場合(ステップS537;No)、「受信モード処理」を実行して(ステップS548)、本処理を終了する。   On the other hand, when CPU 110 determines that it has not been received in step S537 (step S537; No), it executes “reception mode processing” (step S548) and ends this processing.

以上により、本実施形態における端末装置1によると、CPU110は、通信相手の検索が成功した場合に、センサ部30により検出される端末装置1の動作に基づいて動作パターンテーブル132より動作パターンを特定し、当該特定した動作パターンに応じた通信処理内容にて通信相手1bと通信させることができるので、ユーザは操作パネルなどを介して実施すべき通信内容を事前に設定しておく必要がない。
したがって、端末装置1及び制御部100が実行するプログラムは、ユーザにとっての利便性の高い端末装置及びプログラムといえる。
As described above, according to the terminal device 1 in the present embodiment, the CPU 110 specifies the operation pattern from the operation pattern table 132 based on the operation of the terminal device 1 detected by the sensor unit 30 when the communication partner search is successful. And since it can be made to communicate with the communicating party 1b by the communication processing content according to the said specified operation pattern, the user does not need to set the communication content which should be implemented via an operation panel etc. in advance.
Therefore, the program executed by the terminal device 1 and the control unit 100 can be said to be a terminal device and a program that are highly convenient for the user.

また、端末装置1において、CPU110は、通信相手1bを検索する際に、自機1aを通信相手1bとの通信時における送信モードに一時的に設定するパターンと受信モードに一時的に設定するパターンとをランダムな時間間隔で順次切換えることができる。つまり、自機1aと通信相手1bが、同じタイミングで送信モードに設定されるパターンと受信モードに設定されるパターンとを繰り返し切換えることで、通信相手1bを検索することができなくなる(通信状態が確立出来なくなる)事態を回避でき、確実に通信相手1bを検索することが可能となる。   In the terminal device 1, when searching for the communication partner 1b, the CPU 110 temporarily sets the own device 1a to the transmission mode and the pattern to temporarily set the reception mode when communicating with the communication partner 1b. Can be sequentially switched at random time intervals. That is, the own device 1a and the communication partner 1b cannot search for the communication partner 1b by repeatedly switching between the pattern set in the transmission mode and the pattern set in the reception mode at the same timing (the communication state is changed). It is possible to avoid a situation where the communication partner 1b cannot be established, and to reliably search for the communication partner 1b.

また、端末装置1において、CPU110は、通信相手1bの検索が成功した場合、動作パターン8のように、センサ部30により検出される端末装置1の動作に基づいて、自機1aを送信モード又は受信モードに設定することができる。つまり、端末装置1によると、通信処理の実行とともにモードの設定を行うことができるので、ユーザが通信処理を実行する前にモードの設定を完了させておく手間が省かれ、一層端末装置1の利便性は向上する。   In the terminal device 1, when the search for the communication partner 1 b is successful, the CPU 110 sets the own device 1 a to the transmission mode or the operation mode 8 based on the operation of the terminal device 1 detected by the sensor unit 30, as in the operation pattern 8. Can be set to receive mode. That is, according to the terminal device 1, the mode can be set together with the execution of the communication process, so that it is possible to save the user from having to complete the mode setting before executing the communication process. Convenience is improved.

また、端末装置1において、CPU110は、通信相手1bの検索が成功した場合、動作パターン1〜6のように、センサ部30により検出される端末装置1の姿勢に基づいて、自機1aを送信モード又は受信モードに設定することができるため、ユーザはモードの設定操作に手間や時間がかからないので、一層端末装置1の利便性は向上する。   Further, in the terminal device 1, when the search for the communication partner 1 b is successful, the CPU 110 transmits its own device 1 a based on the attitude of the terminal device 1 detected by the sensor unit 30 as in operation patterns 1 to 6. Since the user can set the mode or the reception mode, the user does not need time and effort to set the mode, and the convenience of the terminal device 1 is further improved.

また、端末装置1において、CPU110は、通信相手1bの検索が成功し自機1aを送信モードに設定した際、通信相手1bより動作量を取得し、取得した動作量に基づいて通信相手1bが停止状態にあると判断される場合に、動作パターン4〜6や動作パターン9〜11を特定する。つまり、動作パターン2,3,7,8のように、自機1aと通信相手1bの双方を動作させてはじめて通信処理が実行される場合と比較して、送信モードの端末装置1のみを動作させることで通信処理を実行できるので、ユーザの端末装置1に対する操作の簡便性が向上する。   Further, in the terminal device 1, when the communication partner 1b is successfully searched and the own device 1a is set to the transmission mode, the CPU 110 acquires the operation amount from the communication partner 1b, and the communication partner 1b is determined based on the acquired operation amount. When it is determined that the vehicle is stopped, the operation patterns 4 to 6 and the operation patterns 9 to 11 are specified. That is, as in operation patterns 2, 3, 7, and 8, only the terminal device 1 in the transmission mode operates as compared to the case where communication processing is executed only when both the own device 1a and the communication partner 1b are operated. By doing so, the communication process can be executed, so that the convenience of the user's operation on the terminal device 1 is improved.

また、端末装置1において、CPU110は、通信相手1bの検索が成功し自機1aを送信モードに設定した際、通信相手1bより動作量を取得し、自機1aの動作量及び通信相手1bの動作量の双方に基づいて動作パターン2,3,7,8を特定する。つまり、自機1aと通信相手1bの双方を動作させてはじめて通信処理が実行されるように構成されているので、CPU110が実行する通信処理に係る通信処理内容の判別を確実に行うことが可能となる。   Further, in the terminal device 1, when the search for the communication partner 1b is successful and the own device 1a is set to the transmission mode, the CPU 110 acquires the operation amount from the communication partner 1b, and the operation amount of the own device 1a and the communication partner 1b. The operation patterns 2, 3, 7, and 8 are specified based on both the operation amounts. In other words, since the communication process is executed only when both the own device 1a and the communication partner 1b are operated, it is possible to reliably determine the content of the communication process related to the communication process executed by the CPU 110. It becomes.

なお、以上の実施形態における記述は、本発明に係る好適な端末装置の一例であり、これに限定されるものではない。
また、以上の実施形態における端末装置を構成する各部の細部構成及び細部動作に関して本発明の趣旨を逸脱することのない範囲で適宜変更可能である。
The description in the above embodiment is an example of a suitable terminal device according to the present invention, and the present invention is not limited to this.
Further, the detailed configuration and detailed operation of each part constituting the terminal device in the above embodiment can be changed as appropriate without departing from the spirit of the present invention.

例えば、上記実施形態では、加速度センサ31及び角速度検出センサ32の双方を用いて端末装置1の姿勢変化量や動作量を取得するように構成したが、例えば、動作パターン3,6,11の通信処理を実行する場合のように、並進動作量を必要としない場合は、角速度検出センサ32のみを備える構成としてもよい。
また、例えば、本実施形態では、自機及び通信相手は、別個に設けられた二台の端末装置1としているが、自機を端末装置1、通信相手を当該端末装置1と同一の機能を備えた他の装置(例えば、パーソナルコンピュータなど)としても勿論よい。さらに、動作パターン4〜6,9〜11の通信処理を実行する場合のように、通信相手の動作を把握する必要がない場合、当該通信相手をNFCカードなどとしてもよい。
For example, in the above-described embodiment, the terminal device 1 is configured to acquire the posture change amount and the motion amount using both the acceleration sensor 31 and the angular velocity detection sensor 32. For example, the communication of the motion patterns 3, 6, and 11 is performed. In the case where a translational movement amount is not required as in the case of executing the process, a configuration including only the angular velocity detection sensor 32 may be employed.
Further, for example, in the present embodiment, the own device and the communication partner are two terminal devices 1 provided separately, but the own device has the same function as the terminal device 1 and the communication partner has the same function as the terminal device 1. Of course, other devices (for example, a personal computer) provided may be used. Further, when it is not necessary to grasp the operation of the communication partner as in the case where the communication processes of the operation patterns 4 to 6 and 9 to 11 are executed, the communication partner may be an NFC card or the like.

また、上記実施形態において、フローチャートに記述されている各機能は、コンピュータとしての制御部100(CPU110)が読み取り可能なプログラムコードの形態で記録媒体(ROM130)に格納されており、このプログラムコードに従ったコンピュータ(制御部100)による処理動作が実行される。なお、伝送媒体を介して外部より伝送されてきた上述のプログラムコードに従ってコンピュータ(制御部100)による処理動作を実行することもでき、このような伝送媒体も含めて、本実施の形態では記録媒体と定義する。   In the above embodiment, each function described in the flowchart is stored in a recording medium (ROM 130) in the form of a program code readable by the control unit 100 (CPU 110) as a computer. The processing operation by the computer (control unit 100) is executed. The processing operation by the computer (control unit 100) can be executed in accordance with the above-described program code transmitted from the outside via the transmission medium. In this embodiment, including the transmission medium, the recording medium is a recording medium. It is defined as

1 端末装置
10 通信モジュール部
20 通信アンテナ
30 センサ部
31 加速度センサ
32 角速度検出センサ
40 操作部
50 表示部
55 音声出力部
60 2次記憶部
70 電源部
100 制御部
110 CPU
120 RAM
130 ROM
131 機能識別コードテーブル
132 動作パターンテーブル
DESCRIPTION OF SYMBOLS 1 Terminal device 10 Communication module part 20 Communication antenna 30 Sensor part 31 Acceleration sensor 32 Angular velocity detection sensor 40 Operation part 50 Display part 55 Audio | voice output part 60 Secondary storage part 70 Power supply part 100 Control part 110 CPU
120 RAM
130 ROM
131 Function identification code table 132 Operation pattern table

Claims (10)

通信相手装置と非接触通信で送受信制御を行う端末装置であって、
近距離にある通信相手装置を検索することで当該通信相手装置との通信を一時的に確立する通信確立手段と、
当該端末装置本体の姿勢または動作を検出する検出手段と、
前記通信相手装置との一時的な通信確立後にあって、前記検出手段で検出した当該端末装置の姿勢または動作に基づいて、当該端末装置を送信モードとするか受信モードとするかを設定する設定手段と、
前記設定手段で当該端末装置を送信モードに確定して設定した際は、前記通信相手装置に受信モード設定を指示して当該通信相手装置に対するデータ送信処理を制御し、前記設定手段で当該端末装置を受信モードに確定して設定した際は、前記通信相手装置に送信モード設定を指示して当該通信相手装置からのデータ受信処理を制御し、前記何れのモードにも確定しない場合にはエラーとして一時的に確立した前記通信を解除し、前記通信確立手段による再度の検索を行うように制御する送受信制御手段と、
を具備したことを特徴とする端末装置。
A terminal device that performs transmission / reception control with non-contact communication with a communication partner device,
Communication establishment means for temporarily establishing communication with the communication partner device by searching for a communication partner device at a short distance;
Detecting means for detecting the posture or movement of the terminal device body;
A setting for setting whether to set the terminal device to the transmission mode or the reception mode based on the attitude or operation of the terminal device detected by the detection means after the temporary communication with the communication partner device is established. Means,
When set to confirm the terminal device to the transmit mode by the setting means instructs the reception mode setting to the communication partner apparatus to control data transmission processing for the communication partner device, the terminal device by the setting means when the determined and set to receive mode instructs the transmission mode set in the communication partner device controls the data receiving process from the communication partner apparatus, wherein in the case where neither determined in either mode as errors A transmission / reception control means for canceling the temporarily established communication and controlling the communication establishment means to perform another search ;
A terminal device comprising:
前記送受信制御手段によるデータ送信あるいはデータ受信後にあっては、当該端末装置本体による新たな姿勢または動作を前記検出手段により再度検出した際は、前記設定手段による設定と前記送受信制御手段による制御とを新たに行う、
ことを特徴とする請求項1に記載の端末装置。
After data transmission or data reception by the transmission / reception control means, when a new attitude or motion by the terminal device body is detected again by the detection means, setting by the setting means and control by the transmission / reception control means are performed. New,
The terminal device according to claim 1.
当該端末装置本体に対する動作パターンを検出する動作検出手段と、
を更に具備し、
前記送受信制御手段は、前記動作検出手段で検出された動作が、複数種類の動作パターンの内の何れに該当するかを判別し、その判別された動作パターンに対応する通信処理内容により前記データを送信制御あるいは受信制御する、
ことを特徴とする請求項1又は2に記載の端末装置。
An operation detecting means for detecting an operation pattern for the terminal device body;
Further comprising
The transmission / reception control unit determines which of the plurality of types of operation patterns the operation detected by the operation detection unit corresponds to, and transmits the data according to the communication processing content corresponding to the determined operation pattern. Control transmission or reception,
The terminal device according to claim 1, wherein the terminal device is a terminal device.
前記通信相手装置のとの通信確立後にあって、その通信相手装置の姿勢を当該通信相手装置から取得する取得手段と、
を更に具備し、
前記設定手段は、前記検出手段で検出した当該端末装置の姿勢と、前記取得手段で取得した前記通信相手装置の姿勢と、に基づいて、当該端末装置を送信モードあるいは受信モードに設定する、
ことを特徴とする請求項1〜3の何れかに記載の端末装置。
An acquisition means for acquiring the attitude of the communication counterpart device from the communication counterpart device after establishing communication with the communication counterpart device;
Further comprising
The setting means sets the terminal apparatus to a transmission mode or a reception mode based on the attitude of the terminal apparatus detected by the detection means and the attitude of the communication counterpart apparatus acquired by the acquisition means.
The terminal device according to any one of claims 1 to 3.
前記設定手段は、当該端末装置の姿勢と前記通信相手装置の姿勢とを比較し、その比較結果に基づいて、当該端末装置と前記通信相手装置との何れか一方を送信モードとして設定し、他方を受信モードとして設定する、
ことを特徴とする請求項4に記載の端末装置。
The setting means compares the attitude of the terminal device with the attitude of the communication counterpart device, and sets one of the terminal device and the communication counterpart device as a transmission mode based on the comparison result, Set as the reception mode,
The terminal device according to claim 4.
通信相手装置と非接触通信で送受信制御を行う端末装置であって、
当該端末装置本体の姿勢または動作を検出する検出手段と、
近距離にある前記通信相手装置を検索することで当該通信相手装置を通信相手として特定し、その特定された通信相手装置との通信確立を行った後にその通信相手装置の姿勢または動作を当該通信相手装置から取得する取得手段と、
前記検出手段で検出した当該端末装置の姿勢または動作と、前記取得手段で取得した前記通信相手装置の姿勢または動作と、に基づいて、複数の通信動作内容の内で、前記通信確立後に当該端末装置と前記通信相手装置との間で通信を行う際の双方の通信動作内容を決定する決定手段と、
前記決定手段で決定された通信動作内容に基づいて当該端末装置と前記通信相手装置との間での非接触通信を行う通信制御手段と、
を具備したことを特徴とする端末装置。
A terminal device that performs transmission / reception control with non-contact communication with a communication partner device,
Detecting means for detecting the posture or movement of the terminal device body;
The communication partner device is identified as a communication partner by searching for the communication partner device at a short distance, and after establishing communication with the specified communication partner device , the attitude or operation of the communication partner device is determined. Acquisition means for acquiring from the counterpart device;
Based on the attitude or operation of the terminal device detected by the detection unit and the attitude or operation of the communication counterpart device acquired by the acquisition unit, the terminal after establishment of the communication among a plurality of communication operation contents Determining means for determining the contents of both communication operations when performing communication between a device and the communication partner device;
Communication control means for performing contactless communication between the terminal device and the communication counterpart device based on the communication operation content determined by the determination means;
A terminal device comprising:
前記決定手段は、当該端末装置の姿勢と前記通信相手装置の姿勢とを比較し、その比較結果に基づいて、当該端末装置と前記通信相手装置の通信動作内容を、何れかを一方を送信モードとし、他方を受信モードとして決定する、
ことを特徴とする請求項6に記載の端末装置。
The determining means compares the attitude of the terminal device with the attitude of the communication counterpart device, and based on the comparison result, the communication operation contents of the terminal device and the communication counterpart device, either one of which is a transmission mode And determine the other as the reception mode.
The terminal device according to claim 6.
前記決定手段は、当該端末装置の動作と前記通信相手装置の動作と、を比較し、その比較結果に基づいて、複数種の通信処理内容の内の何れかの通信処理内容を、当該端末装置と前記通信相手装置との通信動作内容として決定する、
ことを特徴とする請求項6又は7に記載の端末装置。
The determining means compares the operation of the terminal device with the operation of the communication partner device, and based on the comparison result, determines any one of the plurality of types of communication processing content as the terminal device. And the communication operation content between the communication partner device and
The terminal device according to claim 6 or 7, wherein
通信相手装置と非接触通信で送受信制御を行う端末装置のコンピュータを制御するためのプログラムであって、
前記コンピュータを、
近距離にある通信相手装置を検索することで当該通信相手装置との通信を一時的に確立する通信確立手段、
当該端末装置本体の姿勢または動作を検出する検出手段、
前記通信相手装置との一時的な通信確立後にあって、前記検出手段で検出した当該端末装置の姿勢または動作に基づいて、当該端末装置を送信モードとするか受信モードとするかを設定する設定手段、
前記設定手段で当該端末装置を送信モードに確定して設定した際は、前記通信相手装置に受信モード設定を指示して当該通信相手装置に対するデータ送信処理を制御し、前記設定手段で当該端末装置を受信モードに確定して設定した際は、前記通信相手装置に送信モード設定を指示して当該通信相手装置からのデータ受信処理を制御し、前記何れのモードにも確定しない場合にはエラーとして一時的に確立した前記通信を解除し、前記通信確立手段による再度の検索を行うように制御する送受信制御手段、
として機能させるようにしたコンピュータ読み取り可能なプログラム。
A program for controlling a computer of a terminal device that performs transmission / reception control with non-contact communication with a communication partner device,
The computer,
Communication establishment means for temporarily establishing communication with the communication partner device by searching for the communication partner device at a short distance;
Detecting means for detecting the posture or movement of the terminal device body;
A setting for setting whether to set the terminal device to the transmission mode or the reception mode based on the attitude or operation of the terminal device detected by the detection means after the temporary communication with the communication partner device is established. means,
When set to confirm the terminal device to the transmit mode by the setting means instructs the reception mode setting to the communication partner apparatus to control data transmission processing for the communication partner device, the terminal device by the setting means when the determined and set to receive mode instructs the transmission mode set in the communication partner device controls the data receiving process from the communication partner apparatus, wherein in the case where neither determined in either mode as errors A transmission / reception control means for canceling the temporarily established communication and performing a search again by the communication establishment means;
A computer-readable program designed to function as a computer.
通信相手装置と非接触通信で送受信制御を行う端末装置のコンピュータを制御するためのプログラムであって、
前記コンピュータを、
当該端末装置本体の姿勢または動作を検出する検出手段、
近距離にある前記通信相手装置を検索することで当該通信相手装置を通信相手として特定し、その特定された通信相手装置との通信確立を行った後にその通信相手装置の姿勢または動作を当該通信相手装置から取得する取得手段、
前記検出手段で検出した当該端末装置の姿勢または動作と、前記取得手段で取得した前記通信相手装置の姿勢または動作と、に基づいて、複数の通信動作内容の内で、前記通信確立後に当該端末装置と前記通信相手装置との間で通信を行う際の双方の通信動作内容を決定する決定手段、
前記決定手段で決定された通信動作内容に基づいて当該端末装置と前記通信相手装置との間での非接触通信を行う通信制御手段、
として機能させるようにしたコンピュータ読み取り可能なプログラム。
A program for controlling a computer of a terminal device that performs transmission / reception control with non-contact communication with a communication partner device,
The computer,
Detecting means for detecting the posture or movement of the terminal device body;
The communication partner device is identified as a communication partner by searching for the communication partner device at a short distance, and after establishing communication with the specified communication partner device , the attitude or operation of the communication partner device is determined. Acquisition means for acquiring from the counterpart device;
Based on the attitude or operation of the terminal device detected by the detection unit and the attitude or operation of the communication counterpart device acquired by the acquisition unit, the terminal after establishment of the communication among a plurality of communication operation contents Determining means for determining the contents of both communication operations when performing communication between a device and the communication partner device;
Communication control means for performing contactless communication between the terminal device and the communication counterpart device based on the communication operation content determined by the determination means;
A computer-readable program designed to function as a computer.
JP2010071188A 2010-03-26 2010-03-26 Terminal device and program Active JP5609202B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010071188A JP5609202B2 (en) 2010-03-26 2010-03-26 Terminal device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010071188A JP5609202B2 (en) 2010-03-26 2010-03-26 Terminal device and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2014096691A Division JP5920399B2 (en) 2014-05-08 2014-05-08 Terminal device and program

Publications (2)

Publication Number Publication Date
JP2011205435A JP2011205435A (en) 2011-10-13
JP5609202B2 true JP5609202B2 (en) 2014-10-22

Family

ID=44881589

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010071188A Active JP5609202B2 (en) 2010-03-26 2010-03-26 Terminal device and program

Country Status (1)

Country Link
JP (1) JP5609202B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5727416B2 (en) 2012-06-01 2015-06-03 任天堂株式会社 Information processing system, game system, information processing apparatus, information processing program, and information processing method
CN102938051B (en) * 2012-08-28 2016-06-29 中兴通讯股份有限公司 A kind of interaction processing method, device and electronic equipment
JP6228370B2 (en) * 2013-02-28 2017-11-08 キヤノン株式会社 COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
JPWO2015141248A1 (en) * 2014-03-18 2017-04-06 日本電気株式会社 Information processing apparatus and control method thereof
JP6212506B2 (en) * 2015-01-13 2017-10-11 任天堂株式会社 Information processing system, game system, information processing apparatus, information processing program, and information processing method
JP2017016699A (en) * 2016-09-26 2017-01-19 任天堂株式会社 Information processing system, game system, information processing device, information processing program, and information processing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3154206A1 (en) * 2004-10-29 2017-04-12 Sony Deutschland Gmbh Method for operating a near field communication system
JP2009278267A (en) * 2008-05-13 2009-11-26 Sony Corp Communication equipment, communication system, communication method, and program
JP2010021810A (en) * 2008-07-10 2010-01-28 Ubiquitous Entertainment Inc File transfer program and file transfer method via wireless communication network
JP4405569B1 (en) * 2008-07-23 2010-01-27 株式会社東芝 Electronic device and communication control method
JP5349893B2 (en) * 2008-10-15 2013-11-20 キヤノン株式会社 Information processing apparatus and information processing apparatus control method

Also Published As

Publication number Publication date
JP2011205435A (en) 2011-10-13

Similar Documents

Publication Publication Date Title
JP5609202B2 (en) Terminal device and program
US11048399B2 (en) Electronic device and method for recognizing stylus pen
CN110829616B (en) Electronic device for controlling communication connection with input device and control method thereof
US20220147161A1 (en) Electronic device for performing correction for stylus, and operation method therefor
EP3862841B1 (en) Electronic device and method for controlling electronic device
EP3151442A1 (en) Wireless communication apparatus and electric power tool-use apparatus
EP3906602A1 (en) Wireless charging alignment
KR20180103094A (en) Extensive Wireless Recognition Tag Charging
US20210349553A1 (en) Digital pen for charging battery and method for operating same
JP6119884B2 (en) Terminal device, setting method, and program
JP5920399B2 (en) Terminal device and program
US11304064B2 (en) Method for expanding wireless communication and electronic device therefor
EP2163968A2 (en) IC chip, information processing device, information processing system, and programs
US11397481B2 (en) Method for processing input made with stylus pen and electronic device therefor
US20200070369A1 (en) Electronic device and method for calculating at least one parameter for measuring external force
US11861081B2 (en) Stylus pen, electronic device for recognizing stylus pen, and method for operating same
JP2010282249A (en) Active type rfid tag and management system
CN116114141A (en) Electronic device for wirelessly transmitting power and method of operating the same
JP2009187495A (en) Information processing unit, information processing method, and program
US20240028144A1 (en) Electronic device including stylus pen and operation method therefor
EP4329385A1 (en) Method and device for linking with vehicle by using uwb communication
JP2013025465A (en) Portable radio communication apparatus, and unit of portable radio communication apparatus and alarm apparatus
US20230168793A1 (en) Electronic device including deformable display and operating method thereof
JP5012831B2 (en) Communication device and floor mat type communication device
JP7022564B2 (en) Communication terminal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130318

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20130318

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140115

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140508

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20140516

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140805

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140818

R150 Certificate of patent or registration of utility model

Ref document number: 5609202

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150