METHOD OF MANAGING A NETWORK AND IMAGE OBTAINING APPARATUS
A method of managing a network performed by a first terminal, the method including: broadcasting a first packet to a network; receiving at least one second packet transmitted by at least one second terminal on the network, in response to the first packet; updating a master terminal in the network and the first packet based on the at least one second packet; and broadcasting the updated first packet to the network.
1 . A method of managing a network performed by a first terminal, the method comprising:
broadcasting a first packet to a network;
receiving at least one second packet transmitted by at least one second terminal in the network, in response to the first packet;
updating, based on the at least one second packet, a master terminal in the network and the first packet; and
broadcasting the updated first packet to the network.
2 . The method of claim 1 , wherein, in response to the at least one second packet not being received within a pre-set time interval from a point of time when the first packet was broadcast, the updating of the master terminal and the first packet comprises:
setting the first terminal as the master terminal; and
initializing the first packet based on information of the first terminal.
3 . The method of claim 1 , wherein, in response to the at least one second packet being received, the updating of the master terminal and the first packet comprises:
setting the first terminal as the master terminal; and
updating the first packet based on at least one of information of the first terminal and the at least one second packet.
4 . The method of claim 3 , wherein:
the first terminal and the at least one second terminal each comprise an image obtaining apparatus;
the first packet comprises a channel of the first terminal, a channel of each of the at least one second terminal, and a time slot; and
the updating of the first packet comprises:
determining the channel of each of the at least one second terminal based on the at least one second packet;
assigning the channel of the first terminal based on the at least one second packet; and
updating the time slot, in which an image transmitting point of time of the at least one second terminal that transmitted the at least one second packet and an image transmitting point of time of the first terminal are assigned according to a pre-set method, based on the at least one second packet.
5 . The method of claim 4 , wherein the pre-set method comprises setting the image transmitting points of time such that time intervals of transmitting I-frames of images obtained by the first terminal and the at least one second terminal are largest.
6 . The method of claim 1 , wherein, after broadcasting of the updated first packet to the network, the method further comprises:
receiving at least one third packet transmitted from the at least one second terminal on the network in response to the updated first packet; and
determining a malfunction of the at least one second terminal based on the at least one third packet.
7 . The method of claim 1 , wherein the first packet comprises at least one of:
a channel of the first terminal;
a channel of each of the at least one second terminal;
a time slot in which an image transmitting point of time of the at least one second terminal and an image transmitting point of time of the first terminal are assigned according to a pre-set method; and
a point of time when the master terminal is updated to the first terminal.
8 . The method of claim 1 , wherein the at least one second packet comprises a channel of each of the at least one second terminal and a time slot in which an image transmitting point of time of the at least one second terminal and an image transmitting point of time of the first terminal are assigned according to a pre-set method.
9 . A method of managing a network performed by a second terminal, the method comprising:
receiving a first packet broadcast by a first terminal through a network;
updating a time slot based on the received first packet; and
transmitting, to the first terminal, a second packet comprising at least one of the updated time slot and a channel of the second terminal.
10 . The method of claim 9 , wherein, in response to a time slot included in the first packet being different from a current time slot of the second terminal, the updating of the time slot comprises updating the current time slot of the second terminal to the time slot included in the first packet.
11 . The method of claim 9 , further comprising:
determining whether a master terminal satisfies a master terminal changing condition;
transmitting a fourth packet to the master terminal in response to a determination that the master terminal satisfies the master terminal changing condition;
updating the master terminal to the second terminal;
updating the first packet based on information of the second terminal; and
broadcasting the updated first packet to the network.
12 . A first image obtaining apparatus comprising a controller configured to:
broadcast a first packet to a network;
receive at least one second packet transmitted by at least one second image obtaining apparatus in the network in response to the first packet;
update a master terminal in the network and the first packet based on the at least one second packet; and
broadcast the updated first packet to the network.
13 . The first image obtaining apparatus of claim 12 , wherein, in response to the at least one second packet not being received within a pre-set time interval after the first packet was broadcast, the controller is further configured to:
set the first image obtaining apparatus as the master terminal; and
initialize the first packet based on information of the first image obtaining apparatus.
14 . The first image obtaining apparatus of claim 12 , wherein, in response to the at least one second packet being received, the controller is further configured to:
set the first image obtaining apparatus as the master terminal; and
update the first packet based on at least one of information of the first image obtaining apparatus and the at least one second packet.
15 . The first image obtaining apparatus of claim 14 , wherein the first packet comprises a channel of the first image obtaining apparatus, a channel of each of the at least one second image obtaining apparatus, and a time slot, and
the controller is further configured to:
determine a channel of each of the at least one second image obtaining apparatus based on the at least one second packet;
assign the channel of the first image obtaining apparatus based on the at least one second packet; and
update the time slot in which an image transmitting point of time of the at least one second image obtaining apparatus that transmitted the at least one second packet and an image transmitting point of time of the first image obtaining apparatus are assigned according to a pre-set method, based on the at least one second packet.
16 . The first image obtaining apparatus of claim 15 , wherein the pre-set method comprises assigning the image transmitting points of time such that time intervals of transmitting I-frames of images obtained by the first image obtaining apparatus and the at least one second image obtaining apparatus are largest.
17 . The first image obtaining apparatus of claim 12 , wherein the controller is further configured to:
receive at least one third packet transmitted by the at least one second image obtaining apparatus on the network in response to the updated first packet; and
determine a malfunction of the at least one second image obtaining apparatus based on the at least one third packet.
18 . A second image obtaining apparatus comprising a controller configured to:
receive a first packet broadcast by a first image obtaining apparatus through a network;
update a time slot based on the received first packet; and
transmit a second packet comprising at least one of the updated time slot and a channel of the second image obtaining apparatus to the first image obtaining apparatus.
19 . The second image obtaining apparatus of claim 18 , wherein, in response to a time slot included in the first packet being different from a current time slot of the second image obtaining apparatus, the controller is further configured to update the current time slot of the second image obtaining apparatus to the time slot included in the first packet.
20 . The second image obtaining apparatus of claim 18 , wherein the controller is further configured to:
transmit a fourth packet to the master terminal in response to a determination that the master terminal satisfies the master terminal changing condition;
update the master terminal to the second image obtaining apparatus;
update the first packet based on information of the second image obtaining apparatus; and
broadcast the updated first packet to the network.