Compare commits
1040 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 26c785f7f4 | |||
| c36547fb62 | |||
| a7ec40805a | |||
| f8ba98843a | |||
| c5037d1594 | |||
| 613a332306 | |||
| e474e93667 | |||
| 6ea2a97ca0 | |||
| fe9a8cca8e | |||
| b1ec1fde9a | |||
| b26d351756 | |||
| 8a0c45ea89 | |||
| 10c2679ebf | |||
| 9615e4936d | |||
| 14b5c3bb39 | |||
| bfa8e6db50 | |||
| b81d969ba3 | |||
| 7b321fba3e | |||
| 19a649bbe2 | |||
| 27e2cbc0d9 | |||
| c8d890d17c | |||
| b7874cc528 | |||
| c26183766b | |||
| 8fd5b780c3 | |||
| 9cb65dfc01 | |||
| 0d6945be98 | |||
| b28ffde9d5 | |||
| d824a1339b | |||
| 8cca1f7e34 | |||
| cb0af6394c | |||
| 85a66fb64c | |||
| 5c865f4a15 | |||
| af771e83b1 | |||
| c20d901d25 | |||
| 9e89e5a92e | |||
| 1f901583d0 | |||
| 954df2d568 | |||
| 21114eaf8f | |||
| 34b2ef2a80 | |||
| 881c730d2e | |||
| 8be2b24737 | |||
| 6f3decc9da | |||
| 5108e545b6 | |||
| d3fb7859b6 | |||
| 787a6527fa | |||
| e5cbd4b688 | |||
| 74b6dd4a1b | |||
| f99b4741da | |||
| da5e0bd177 | |||
| 610572398f | |||
| 621d72b85a | |||
| 1ead4ecb93 | |||
| e4c1177eea | |||
| e76e11b754 | |||
| 6dc90bd525 | |||
| 4df8d110b0 | |||
| cf84acac55 | |||
| 514428c665 | |||
| 4171c1f006 | |||
| 6d1caf2d23 | |||
| cff443f0e9 | |||
| 4b58393c65 | |||
| 961639711b | |||
| 274719541b | |||
| 5a9ce44914 | |||
| 8e358dc4ef | |||
| cb533b090d | |||
| 29fa93ffcf | |||
| b7b9900de3 | |||
| 49ca7e09d6 | |||
| f59ab5054d | |||
| 24a1c447be | |||
| 91dc7984ce | |||
| 5538dc8325 | |||
| db429f1604 | |||
| 987e831099 | |||
| 0398365f2a | |||
| 17d1b6c488 | |||
| 936c408784 | |||
| 6b74310b70 | |||
| 5d5388f827 | |||
| 941fdbb450 | |||
| 956e825c5e | |||
| 2facff3a13 | |||
| 3caae897c3 | |||
| 1e95207b08 | |||
| c8f2dc8a82 | |||
| 8c53531504 | |||
| 0b238988f8 | |||
| 634f9fc48a | |||
| 87e2b8ce71 | |||
| 6b1c8a37e2 | |||
| 5f6195a9d1 | |||
| e1708d110d | |||
| fe25b83352 | |||
| adfe5351ed | |||
| 245514774c | |||
| b892a7cf20 | |||
| 6193e9b971 | |||
| 4b70ac2f54 | |||
| cfd7d0ec7f | |||
| 277c7893a6 | |||
| 3243ee17fc | |||
| 9e517547d6 | |||
| e942125c3c | |||
| be5df703e8 | |||
| 8d151d6f3c | |||
| 10223d8a06 | |||
| 146aff140f | |||
| feacd9ae8a | |||
| c3d9f44f24 | |||
| 61bd4e9afd | |||
| 83aef7a264 | |||
| d1a80bd3d3 | |||
| 995b5a77e9 | |||
| c681bd5cc0 | |||
| 32caddbe8a | |||
| 87b62f8bb2 | |||
| 1e525c8838 | |||
| 4ed52401ea | |||
| 331ab9bf6a | |||
| d8585d7811 | |||
| 2096b778c0 | |||
| 81470638e0 | |||
| b1ec95bcf7 | |||
| d1c2196933 | |||
| e0514b0ef3 | |||
| 2d7c2fb6ff | |||
| 39cc84521e | |||
| e14235619f | |||
| 893e206592 | |||
| 91e38629e6 | |||
| bc3212848a | |||
| 3eba2d764f | |||
| edc899f43e | |||
| 2480beb7a5 | |||
| f626dd2883 | |||
| fb774e2e74 | |||
| eb137084bf | |||
| a3f51f131f | |||
| 20655fa939 | |||
| d6747007c4 | |||
| de6e21453c | |||
| 339929476a | |||
| fa6791457d | |||
| f3ed735dc2 | |||
| 6b92c550ab | |||
| 716a9d8a5c | |||
| f36ec25905 | |||
| efab21f467 | |||
| 8a6cfa7c24 | |||
| 2376c04a75 | |||
| 3ce38c1dc2 | |||
| df0e0057ac | |||
| 2ebdf8e23e | |||
| df39b9e87c | |||
| 6cc89a303c | |||
| ca128a3a1f | |||
| ba080de202 | |||
| 706313566d | |||
| 82b7c3e2f3 | |||
| 0eba3bc1fc | |||
| 9bc0d6719a | |||
| 35d2fae44c | |||
| c5b5c779af | |||
| dbad071a35 | |||
| f768bd633c | |||
| ec160eace9 | |||
| b72daa0422 | |||
| 32b236bc54 | |||
| 87a47411ae | |||
| 5c6daf2e6d | |||
| 467b90e52a | |||
| 21c2f8a697 | |||
| 3a8a7ccc1d | |||
| d52fc27bb7 | |||
| 162964f2b0 | |||
| ed7927e7d7 | |||
| 14ea9c4537 | |||
| 49758c0720 | |||
| 2e2c611cad | |||
| 0273dd4aa6 | |||
| 3c61557b34 | |||
| 35d4c42bd3 | |||
| 3fefec761b | |||
| 90d92a606b | |||
| d21a995d9a | |||
| 7b26a9d537 | |||
| f5c8cd2f66 | |||
| ce9107a2b1 | |||
| d8246122aa | |||
| a94269ada7 | |||
| 3b2c01dff2 | |||
| 41d86e7ce4 | |||
| 7a9750bcea | |||
| 53d66fd111 | |||
| 6680e86017 | |||
| 557a160eb6 | |||
| f98b8a7cec | |||
| 4531b465dc | |||
| e7602db886 | |||
| 2bd4945ceb | |||
| 8102cffb11 | |||
| d9f7e6d048 | |||
| b38fcddfed | |||
| 4904f0888f | |||
| 99eaec6fa9 | |||
| 4f4b78a11e | |||
| d186fd0d48 | |||
| 4d6ac07171 | |||
| 47d7aede24 | |||
| d55e30f3c1 | |||
| 1976f7951e | |||
| 07eef7acc6 | |||
| 743c846a58 | |||
| ab7c9fd073 | |||
| ab1bb2b288 | |||
| 89571ab68c | |||
| 6271aa9b82 | |||
| 22ad277e21 | |||
| cb39f199a2 | |||
| 5490d1cb6f | |||
| 53a2a81b08 | |||
| f84b655bd2 | |||
| edb7679510 | |||
| f6b3402cec | |||
| f2878e7962 | |||
| c1ddf9270c | |||
| e2d4491ded | |||
| d6510eea0b | |||
| c2dcf32374 | |||
| 4678f7e502 | |||
| 37d3b65c38 | |||
| ba44c882f7 | |||
| 3c436d3035 | |||
| 844f7cee74 | |||
| bb13ed1f0b | |||
| a315dec96f | |||
| 718935136b | |||
| 528a63ac83 | |||
| bdc9e14c9a | |||
| 8de1621a9b | |||
| 0ff0e7d004 | |||
| 57c7a9c1b8 | |||
| d2066337ec | |||
| 68f9c509cb | |||
| 88fa2c5e31 | |||
| 0896a87a95 | |||
| b87a618517 | |||
| 85f75d8bdf | |||
| e7b0779afd | |||
| 04729ba395 | |||
| ede92fc3ec | |||
| 175809fa73 | |||
| 442eab9a4e | |||
| 96c2365008 | |||
| f45c8d5e85 | |||
| 54d443dc58 | |||
| cc3eaf4ff3 | |||
| 219d7b2a98 | |||
| c094ff3765 | |||
| 4b64cacc70 | |||
| d60c1c24d2 | |||
| 3aa226795d | |||
| f867531f7b | |||
| 5a297e339c | |||
| cfb93265bd | |||
| eefb0fb886 | |||
| 0bfa5fb998 | |||
| e377859a55 | |||
| def17e9f42 | |||
| 0434e1d5fd | |||
| 36deaa97d0 | |||
| 3826ef5201 | |||
| 233597f112 | |||
| 08b6e23b0f | |||
| 61ab4a5658 | |||
| 47c35bf816 | |||
| 82d07d80fe | |||
| c4e5d7b434 | |||
| a7d26aaff4 | |||
| c37868ba78 | |||
| 311d50f15d | |||
| f963a20f43 | |||
| 91ed7c11c5 | |||
| 265808e1f6 | |||
| c61eecb19f | |||
| 1f97fff0a3 | |||
| b5f7c0f3d8 | |||
| 630bc16f5f | |||
| 2ce6a68df4 | |||
| ab221c8ae0 | |||
| 71d6b942e2 | |||
| 7efbfaa3b4 | |||
| 19cb3256a4 | |||
| 3a4852d620 | |||
| dced813943 | |||
| 1eb6d9006d | |||
| 25aea32431 | |||
| 965641491b | |||
| a13ab55970 | |||
| 701f009d65 | |||
| 3b52d54ab4 | |||
| 05f04b7d5b | |||
| e289f65434 | |||
| 62cacfa547 | |||
| ee1f90b3dd | |||
| cff5cc7ece | |||
| 5000a266a0 | |||
| a32ef02e5c | |||
| ab483153e0 | |||
| 57e0645e77 | |||
| a54b2b1abe | |||
| c65dcf3ddc | |||
| 1f2f82e73b | |||
| b5b94325f8 | |||
| 22cafeef45 | |||
| 497f6c4551 | |||
| b45eae3a8b | |||
| bf683018c0 | |||
| f911272876 | |||
| a15ba86095 | |||
| 7ac6db69f7 | |||
| b7052efa92 | |||
| db3586bcf3 | |||
| b75190f839 | |||
| 0f0be4f256 | |||
| 74e8f46dbe | |||
| 5947aaeea8 | |||
| fde8aa493a | |||
| 7c8ce8c394 | |||
| 7d60f3326b | |||
| 355f4b0efe | |||
| 7249793377 | |||
| e2454b4e3d | |||
| 61d18f7758 | |||
| c5db94cf59 | |||
| 605172bdb3 | |||
| d67fbf1bcc | |||
| ae8ab6b420 | |||
| 5ab6b39b76 | |||
| 092bc7e72d | |||
| 5a7dbba645 | |||
| 4e20fc9606 | |||
| 862f903aff | |||
| 82e68b6678 | |||
| 47873dde26 | |||
| fa2c646dac | |||
| 8229e761ab | |||
| 56254b3df4 | |||
| 3231466a90 | |||
| 14b4f8020a | |||
| dcecb52dee | |||
| b4966a6cb8 | |||
| 64f8d32481 | |||
| 3331bb61de | |||
| 91dfcad058 | |||
| b6fdb64c73 | |||
| 45cfb4ee97 | |||
| 73d4e1d94d | |||
| 71fd88e4a6 | |||
| d069852454 | |||
| 36119a24d2 | |||
| 9582139928 | |||
| 434b8837b7 | |||
| 1fcdaa195a | |||
| 708acb13f7 | |||
| 82dfa162df | |||
| 786e2d13e3 | |||
| cdd6daa1be | |||
| eb12b2a234 | |||
| 89fefc274e | |||
| c25fc9211f | |||
| f84cb85eae | |||
| 98f7489bd8 | |||
| 5d0043684a | |||
| ac4c93a386 | |||
| cffe617ed5 | |||
| d5e07d4d21 | |||
| cd9d299cbb | |||
| 1c84005356 | |||
| f801b69f59 | |||
| 51e76c1561 | |||
| a8ed55073a | |||
| 033b3bf3fb | |||
| d4f9ab03e3 | |||
| 8670f4ebe1 | |||
| a10738794c | |||
| 5d64f4ec09 | |||
| bcc92105cb | |||
| a00c60d2b5 | |||
| b3f07c2719 | |||
| ff89207c34 | |||
| efdd64ba9a | |||
| dc356e6945 | |||
| a9872070a0 | |||
| 6061e1e7a6 | |||
| d890fc28ae | |||
| 771c8e0567 | |||
| 987d431858 | |||
| d1a05d665b | |||
| b610e17de6 | |||
| 59ecdad513 | |||
| e1f11055fb | |||
| 07e68714f5 | |||
| 2b1fc785e2 | |||
| f087564a97 | |||
| c7ed56cf31 | |||
| 6dcd8d1d4b | |||
| 54f05f46d1 | |||
| 92e07b44c5 | |||
| f6df523d4c | |||
| e458543e74 | |||
| 5375837ff2 | |||
| f1f58c9470 | |||
| 1043ce9dfe | |||
| 2ad7789d10 | |||
| 0767d2d148 | |||
| 119db726a3 | |||
| 697362221d | |||
| 74b42ea78a | |||
| 90900cf771 | |||
| cafd1b7241 | |||
| 93b51c01a9 | |||
| 4f68c34362 | |||
| 5f578e037a | |||
| 2fa353cd73 | |||
| a32ed29e05 | |||
| f37a7d7922 | |||
| 148bdc17e7 | |||
| e0d19e7006 | |||
| 34000dbd99 | |||
| 3f1f60f30b | |||
| beec21fc5c | |||
| 00a0bd560e | |||
| 61422be35d | |||
| 03e6599d83 | |||
| 088ac49851 | |||
| df3b306980 | |||
| 6354c0e7d9 | |||
| 9ce9113f9e | |||
| 8118708550 | |||
| 2dd0a25707 | |||
| ab9432426f | |||
| bcf4b0f716 | |||
| 4d115057b1 | |||
| 9497693bc5 | |||
| 8d89016db4 | |||
| 66e86f5f18 | |||
| 23d34c1a8c | |||
| 937f818881 | |||
| 25abe76198 | |||
| 97c61a973a | |||
| 55ac192897 | |||
| 5c77551d61 | |||
| c3ffa7cbde | |||
| 61fb3e6183 | |||
| 0176510fd5 | |||
| 824ac7b7fc | |||
| 2f7a5f272e | |||
| 8bd4c71c6f | |||
| 425311025c | |||
| db8926918a | |||
| fb5376aa38 | |||
| 90d5ec411e | |||
| a00475738d | |||
| d345a6f044 | |||
| 837ef07704 | |||
| 3acef7decc | |||
| 86ac598ee9 | |||
| 78777c6bec | |||
| e976508232 | |||
| 85867890eb | |||
| 7dc904d47e | |||
| 4776437b55 | |||
| b2dc309b42 | |||
| b1cf22e511 | |||
| 9aa213487a | |||
| 4bd10b0e83 | |||
| 4b987b4945 | |||
| ce1a35b190 | |||
| 55892e220b | |||
| f5e4e4f5a7 | |||
| 32be48e6fd | |||
| e485193c6b | |||
| 00c352ba6a | |||
| bbd2be74f0 | |||
| dbc093a198 | |||
| 2ac6a7ddb7 | |||
| e024255b84 | |||
| 4a25ab2a96 | |||
| 235a2f975a | |||
| 77f1a17986 | |||
| 1ac27a6446 | |||
| 9e8391f98b | |||
| 8e35aa4f5d | |||
| 74ce29e35e | |||
| bfb47526d8 | |||
| d8c33fd748 | |||
| a94e1636c6 | |||
| a87305441a | |||
| 882ade0b45 | |||
| bda1449af5 | |||
| 0eba98ace5 | |||
| 82818f97e5 | |||
| edf367f3a8 | |||
| 0569b69c08 | |||
| 018eb38f90 | |||
| 114f3ea17f | |||
| affd9f3e8e | |||
| 8c7b65724b | |||
| 2c98efe346 | |||
| 73e4958391 | |||
| 2a40ccea58 | |||
| da00bda1e8 | |||
| 68fb869301 | |||
| 04faa96237 | |||
| 740e60745c | |||
| a2d56ff2ba | |||
| 469268d032 | |||
| 8369ecd871 | |||
| 2268e6023f | |||
| e43d82ee46 | |||
| 3a3d09ddf5 | |||
| 21d1669f26 | |||
| 74eb4ccae4 | |||
| 67c4d928e2 | |||
| 4df8ecadfc | |||
| 0fc8864ea2 | |||
| 197b00cd8c | |||
| 86a38377ee | |||
| 9f49f8ca3f | |||
| 186b066f10 | |||
| 26e8508629 | |||
| 6fa1c2c541 | |||
| c6def22e14 | |||
| 4ebc2f44dc | |||
| 48e8d8e5b8 | |||
| 07fd5432b6 | |||
| 06cb1b297c | |||
| bb573fe8cb | |||
| de6468c57f | |||
| 1c11c23bf2 | |||
| b4507b374d | |||
| 26f633a03a | |||
| da276b4434 | |||
| 521dac2e42 | |||
| 425901063e | |||
| 2c422a62da | |||
| ae67ce9aeb | |||
| 1f2c6a9549 | |||
| caac49ec26 | |||
| 4b11db03a6 | |||
| e372cb9438 | |||
| ec7ad7017e | |||
| d4e3d4b1c5 | |||
| 30a6deaf68 | |||
| 39d78d75b7 | |||
| c8e2ec69cb | |||
| 85059b47af | |||
| 33441eb6d7 | |||
| c79ec181ca | |||
| 674f7bb4a2 | |||
| 6fbf8a2903 | |||
| a082a2147f | |||
| e00b411338 | |||
| b5d5ae9bbe | |||
| cc159ffdbf | |||
| 67cb022f24 | |||
| ac41218be1 | |||
| 7f3a2d14dd | |||
| 5ebb8e852d | |||
| 7be511e7a2 | |||
| e0c8f89dac | |||
| 062e9c5419 | |||
| 2f871db6ed | |||
| 8eb2ead9b3 | |||
| 62639939a0 | |||
| 5c329e5f14 | |||
| 7cbc6f4807 | |||
| 22eebc59fb | |||
| 999cd7a0a5 | |||
| 10204f96c0 | |||
| 448d50f7a7 | |||
| bf7e83fc90 | |||
| d7159d8b3d | |||
| d1fc111f86 | |||
| b44276745d | |||
| b3d8dfa650 | |||
| 876ae0d8f1 | |||
| a96da6258e | |||
| dcc05b6e5a | |||
| 0d6a45e6ef | |||
| 36cab2d1d1 | |||
| 822ee6b506 | |||
| 7db8dfd749 | |||
| adfc24c2f7 | |||
| 4e2edf5233 | |||
| ba250ce8a4 | |||
| c15de84aa7 | |||
| fe1b477f0a | |||
| e40f1eef01 | |||
| 40ba2afd61 | |||
| 162e0ce87f | |||
| 872e0650ef | |||
| 2037b3750b | |||
| b76bb9fe7a | |||
| 0d0337ff0a | |||
| fef5773d2f | |||
| 6aa793627b | |||
| d9ec81bd11 | |||
| 7055d264e0 | |||
| 153f287431 | |||
| 6d6d24b802 | |||
| 5b0048dcc0 | |||
| 301daa4936 | |||
| c97b8cd7e2 | |||
| 88a8a8ae96 | |||
| f80477f22c | |||
| d9db028886 | |||
| 0cd3ba69c9 | |||
| 28f0d932c3 | |||
| 6859484cd9 | |||
| fbab4888e1 | |||
| a8cb94592d | |||
| f8d42f263c | |||
| c2efbb7574 | |||
| 8d40478f03 | |||
| 2b430c25f7 | |||
| 9b02fa25d8 | |||
| ebcb9d0975 | |||
| 90ed16d960 | |||
| 3e4fe029ef | |||
| f01f6f1881 | |||
| b6faed0a03 | |||
| b68b04cd9a | |||
| f5018e9b32 | |||
| e71f2e7526 | |||
| 01ffd73e66 | |||
| f243e3c4a3 | |||
| 184b778054 | |||
| 3429bed59f | |||
| 5449ef6506 | |||
| b277b8e268 | |||
| 3bf257a6a7 | |||
| d4cb329187 | |||
| 397045be73 | |||
| e28fa7a8ae | |||
| c488f7e2f8 | |||
| c2157d627a | |||
| e3df8cd62a | |||
| 8b8e2d6a6a | |||
| 26f812dbab | |||
| aa732e3150 | |||
| 5f16220620 | |||
| e518f89149 | |||
| a8e271d00e | |||
| 487cb458eb | |||
| 44948072da | |||
| 5bae1efd32 | |||
| 59db6e76a0 | |||
| f45e5c994f | |||
| 7f8b6ebb30 | |||
| 3d2de8e755 | |||
| 9c198326c4 | |||
| 7e0f542425 | |||
| c6646a98c7 | |||
| 86a64a386f | |||
| 076bfeb84d | |||
| 600ff739d0 | |||
| 5366bd2b05 | |||
| d3795d1fd7 | |||
| c5f11f93c6 | |||
| 639da3d881 | |||
| 1c02795040 | |||
| a8bb36fa5b | |||
| 2feb356a6a | |||
| 20fcf88e65 | |||
| 197fa12c5a | |||
| 434b23d526 | |||
| 8e5b8e5263 | |||
| aedebed963 | |||
| 337cece5b3 | |||
| 82d5f3dc66 | |||
| d137f359ee | |||
| d7f6abde72 | |||
| 55b7799d45 | |||
| b001f2de74 | |||
| 69a850847b | |||
| fdf2345fe5 | |||
| 73e6372e87 | |||
| a055cc74a1 | |||
| 6c1a05b51a | |||
| b2e664b528 | |||
| 7c93da255a | |||
| fd55bb9eb4 | |||
| 6b55414f97 | |||
| d4708eafe9 | |||
| bf7fd13cf2 | |||
| 0190150a53 | |||
| 3ca5d3f48f | |||
| f4367dd3d9 | |||
| 7ee59ea98e | |||
| d662e57110 | |||
| 2a68887b95 | |||
| 4970471c14 | |||
| 1ffa5ee4ff | |||
| 08ab38c83e | |||
| 63e455ac20 | |||
| 18a6d10720 | |||
| ecacc5f6b0 | |||
| 6020cf049d | |||
| 84cf17657a | |||
| 839f130235 | |||
| 209a2c5aad | |||
| 7d9d714167 | |||
| c9a202c270 | |||
| b801638bfc | |||
| ad24740aad | |||
| 90e4add7b0 | |||
| 006fee1904 | |||
| ae7d8de869 | |||
| 17bd050e47 | |||
| f1b6763fbc | |||
| 42de4d9467 | |||
| 6a15d834a7 | |||
| 90e1e67787 | |||
| 72f02d88e3 | |||
| 465c049f5a | |||
| fcc4148d33 | |||
| 635c1fe872 | |||
| 4076529314 | |||
| bdbce46f5e | |||
| 78e27d7389 | |||
| f93857bb07 | |||
| 5e621146e0 | |||
| 9c10fe7d51 | |||
| da322765fa | |||
| 201f0b3b0b | |||
| d34c412f56 | |||
| 0df870f767 | |||
| ada9c29d90 | |||
| 24ba70200a | |||
| 9018b6660f | |||
| d8f66f735f | |||
| 1e9fae98bb | |||
| db0d7d03ab | |||
| 60dec1c7e8 | |||
| 8fe8a8b422 | |||
| 69a5b86172 | |||
| 524f3a41a3 | |||
| b59909017c | |||
| d7fbdc84fb | |||
| af72c038b7 | |||
| 702cbc3fcd | |||
| d4608cf111 | |||
| 8aaee2d6a3 | |||
| 974fc29ea5 | |||
| 8fae899864 | |||
| 173cf53659 | |||
| 558cb5eecc | |||
| a84fed8f38 | |||
| 822ee009ab | |||
| 5ec847c2b4 | |||
| cb6cab864f | |||
| c90c346d5c | |||
| d55789868b | |||
| 2ff788a753 | |||
| 00f05a0abc | |||
| 98a26deec1 | |||
| 225e69d791 | |||
| 1c5ee18f33 | |||
| 8818562427 | |||
| 024b351e01 | |||
| d1b8c4c88c | |||
| 9472b58917 | |||
| 0102426944 | |||
| f68fe8f4c1 | |||
| 74fa2ba5e0 | |||
| 6afd47c6c8 | |||
| 09b6a5bdfb | |||
| d4b9826a1c | |||
| 23039d70ce | |||
| eeee762ea2 | |||
| 7a0e290852 | |||
| d000812b1b | |||
| 78f7fef045 | |||
| f7a35332f7 | |||
| f85a38234b | |||
| 286c29bd7c | |||
| 886fc11c18 | |||
| 98afe36651 | |||
| 91b6095b37 | |||
| 7e4f64a98c | |||
| 5f380bf44e | |||
| 226088ae19 | |||
| 89ca0f41b8 | |||
| 85d13e1602 | |||
| ce3830d80e | |||
| 980eca3156 | |||
| ccadcd0f45 | |||
| 3b8ab18589 | |||
| a9f54b7aee | |||
| 9fe51dbbe1 | |||
| 79138ef253 | |||
| 8595285aa6 | |||
| 41e8a84b32 | |||
| c9526cc120 | |||
| 3a9ec76447 | |||
| 509128bf86 | |||
| 917f9422f2 | |||
| ae3e74d018 | |||
| 0876587866 | |||
| 338e42e2b5 | |||
| 3fc6d14d5a | |||
| d9274f8e6f | |||
| a4a93b03cc | |||
| b48b101091 | |||
| 72a3532d4f | |||
| 188b81aa33 | |||
| 78c609347e | |||
| dac160cef4 | |||
| 301bdf6315 | |||
| fc389504eb | |||
| 52ec777651 | |||
| 623129cad0 | |||
| 8f0b186a1d | |||
| 1fe6b9b647 | |||
| 480d496e84 | |||
| 56427c65dd | |||
| 6c63c1be0d | |||
| fb5af90e7b | |||
| 5941829751 | |||
| c76e953df0 | |||
| 412cea6a44 | |||
| bc3048e808 | |||
| 485596866f | |||
| aa00258821 | |||
| 23418b1756 | |||
| d88024770a | |||
| db6477eb00 | |||
| b4aaf6c7a3 | |||
| e6dadce25f | |||
| 3fda1bcb63 | |||
| 4340b3ea38 | |||
| 18ca0117d0 | |||
| 52d0e62418 | |||
| 2c26e42236 | |||
| 9492fec827 | |||
| e88c354efc | |||
| 189b5ee646 | |||
| 63b8e5d608 | |||
| 29467d5ae3 | |||
| 18a2cb4202 | |||
| 9cab9870bf | |||
| 6faeab7c06 | |||
| b4e4b88094 | |||
| 228d7b1465 | |||
| fb8e86e825 | |||
| 0a82f37951 | |||
| d4af7c3e38 | |||
| be3b49d784 | |||
| ad28b9471f | |||
| 0a1faba103 | |||
| 278928a62a | |||
| f28810f201 | |||
| 9112613cce | |||
| a0c2a6f502 | |||
| 3770946c3b | |||
| ebbd12faa2 | |||
| 1add609bb3 | |||
| 30b75722b6 | |||
| d76b10b2da | |||
| d0fa0f0580 | |||
| 03be9be148 | |||
| 4ab0508782 | |||
| 7a5f47076d | |||
| c90b405970 | |||
| 81456d96ff | |||
| 15b7e21822 | |||
| 4f8d4fa99e | |||
| fd9d41ca37 | |||
| f232be8746 | |||
| e5c209bc89 | |||
| 6f11d3466a | |||
| 63b97fdcb5 | |||
| 9e2a3a3f59 | |||
| b679d711e7 | |||
| e29691ec46 | |||
| 5e3b170af0 | |||
| 76dfba65f1 | |||
| 9a99c4f1a4 | |||
| 65206e7423 | |||
| 0eb2228312 | |||
| e50f2e8256 | |||
| 4bc023abde | |||
| dde451690f | |||
| 79af532352 | |||
| 2e68cfb2ba | |||
| cce81e6d81 | |||
| 9454b17d39 | |||
| a6089f0bc8 | |||
| c10626edc9 | |||
| 41b78136b2 | |||
| 043abf2ef0 | |||
| 9f504339b5 | |||
| b3fb3a7e9e | |||
| 7fef4a3b23 | |||
| 25fccd6ab4 | |||
| 887bd18aef | |||
| 8177fa1896 | |||
| c37f7496f6 | |||
| 13e4a3bb66 | |||
| db3668cf18 | |||
| bb62934bb8 | |||
| a80993f5cd | |||
| 2e1ef02e58 | |||
| 63f8c0613a | |||
| 3ee33777f1 | |||
| 30cd9cf6a6 | |||
| 411d74caf0 | |||
| be2598b064 | |||
| 9f67d5452d | |||
| edb738484f | |||
| 4353a458bd | |||
| 1eea8e7f4c | |||
| 727f9d1dae | |||
| 506a823251 | |||
| bc35d6c4d1 | |||
| 556e2c4d61 | |||
| 88d43982af | |||
| 977e4910c0 | |||
| 9ac64226f8 | |||
| f7da5a2d04 | |||
| d81eb21ede | |||
| f22d2880b1 | |||
| 8ef550947b | |||
| d40798be09 | |||
| 48aef13153 | |||
| edba85074b | |||
| 5ae2af0bc8 | |||
| bdb3ee6378 | |||
| dfc970e1db | |||
| c0f571d291 | |||
| f30c7fb487 | |||
| 8f8bf93fb1 | |||
| ebd246373b | |||
| 6ebad8cafd | |||
| e484c3f6de | |||
| da45f44f88 | |||
| 3298b01e46 | |||
| 464159f8da | |||
| 0d80b92503 | |||
| 90d9a75464 | |||
| 6f125e5447 | |||
| d453f95d2f | |||
| b41b74f7bc | |||
| fae8264a0e | |||
| 5507287a44 | |||
| 94bf505883 | |||
| 6175e1d56e | |||
| e79d7d42d2 | |||
| 613f63b226 | |||
| 0c26036a8b | |||
| 953a052e24 | |||
| 77462237d6 | |||
| e8ce6af4c6 | |||
| 32740f66f6 | |||
| 28c670774b | |||
| d970373982 | |||
| 4da4c6ac00 | |||
| 211940d099 | |||
| c46fea1674 | |||
| 2cc758d3db | |||
| 20ec53b2fd | |||
| 155a3eaf7d | |||
| 5dea197dd1 | |||
| bdf7d3cbf6 | |||
| bf0d2cee93 | |||
| 3477c34316 | |||
| e3eaf0055a | |||
| 87644a6b6f | |||
| d3daea2383 | |||
| 08af9f69f1 | |||
| 8dea0f5c0d | |||
| cbd1644d6d | |||
| 9188e00b62 | |||
| 3bb175647e | |||
| e8201637e3 | |||
| 90c8518f30 | |||
| c6387d9aae | |||
| 717f17baf4 | |||
| c8d0d975a5 | |||
| 4d6f017eb8 | |||
| 7d6ec5a5f0 | |||
| 69df1211f2 | |||
| f43bd422db | |||
| cf38486c97 | |||
| 681ac0322b | |||
| e800b57d8c | |||
| e3cca122f6 | |||
| 6872486a0c | |||
| b7eb3a3864 | |||
| 5eb6cc8ff3 | |||
| 7f593b3809 | |||
| 914eed96a4 | |||
| b4b4ae2809 | |||
| 480e9d8ce6 | |||
| 38b203dc0b | |||
| 4f1b83361b | |||
| a3744328eb | |||
| d5c4a957c9 | |||
| 2512d6e5f2 | |||
| e0a45a7c85 | |||
| 7285618181 | |||
| fe8b7af08e | |||
| f852c34b67 | |||
| 5030983f94 | |||
| 76d7950658 | |||
| c973242b16 | |||
| d3ede81e7e | |||
| eba96e9492 | |||
| c7bb0f6ab5 | |||
| 85d23eaa6f | |||
| efbe52ba3a | |||
| d70862652b | |||
| 0e2ca4a526 | |||
| 4ac48941da | |||
| b23370a270 | |||
| 912a116dc2 | |||
| bb7ad3edf0 | |||
| 04ff13d798 | |||
| 84862bf2a1 | |||
| 1f5458c9e2 | |||
| 9686e954ea | |||
| 7637c29c85 | |||
| 6f543acc96 | |||
| f3bae4296c | |||
| 502014df3e | |||
| e3048d2b0d |
@@ -28,6 +28,7 @@
|
||||
^doc/manual/figures/.*eps
|
||||
^doc/manual/figures/.*pdf
|
||||
^doc/manual/figures/.*png
|
||||
^src/.*/doc/build
|
||||
^bindings/python/pybindgen/
|
||||
ms_print.*
|
||||
massif.*
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Alexander Afanasyev <alexander.afanasyev@ucla.edu>
|
||||
Rohit Agarwal (mindprince@gmail.com)
|
||||
Kirill Andreev (andreev@iitp.ru)
|
||||
Dean Armstrong (deanarm@gmail.com)
|
||||
Nicola Baldo (nbaldo@cttc.es)
|
||||
@@ -16,9 +17,11 @@ Elena Buchatskaia (borovkovaes@iitp.ru)
|
||||
Gustavo Carneiro (gjc@inescporto.pt, gjcarneiro@gmail.com)
|
||||
Egemen K. Cetinkaya (ekc@iitc.ku.edu)
|
||||
Angelos Chatzipapas (chatzipa@ceid.upatras.gr)
|
||||
Yufei Cheng (yfcheng@ittc.ku.edu)
|
||||
Andrey Churin (aachurin@gmail.com)
|
||||
Salva Climent (jocliba@gmail.com)
|
||||
Luis Cortes (cortes@gatech.edu)
|
||||
Luca Costantino (luca.costantino@gmail.com)
|
||||
Craig Dowell (craigdo@ee.washington.edu)
|
||||
Denis Fakhriev (fakhriev@iitp.ru)
|
||||
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
|
||||
@@ -27,13 +30,15 @@ Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
|
||||
Charline Taibi Guguen (charline.guguen@gmail.com)
|
||||
Tom Goff (tgoff@tgoff.net)
|
||||
David Gross (gdavid.devel@gmail.com)
|
||||
Daniel Halperin <daniel@halper.in>
|
||||
Daniel Halperin (daniel@halper.in)
|
||||
Bruno Haick (bghaick@hotmail.com)
|
||||
Frank Helbert (frank@ime.usp.br)
|
||||
Tom Henderson (tomhend@u.washington.edu)
|
||||
Blake Hurd (naimorai@gmail.com)
|
||||
ishan <ishan.chhabra@gmail.com>
|
||||
Mohamed Amine Ismail (amine.ismail@inria.fr, iamine@udcast.com)
|
||||
Atishay Jain <atishayjain25@gmail.com>
|
||||
Sascha Alexander Jopen <jopen@informatik.uni-bonn.de>
|
||||
Sascha Alexander Jopen (jopen@informatik.uni-bonn.de)
|
||||
Sam Jansen (sam.jansen@gmail.com)
|
||||
Liu Jian (liujatp@gmail.com)
|
||||
Joe Kopena (tjkopena@cs.drexel.edu)
|
||||
@@ -48,13 +53,18 @@ Antti Makela (zarhan@cc.hut.fi)
|
||||
Francesco Malandrino (francesco.malandrino@gmail.com)
|
||||
Fabian Mauchle (f1mauchl@hsr.ch)
|
||||
Andrey Mazo (mazo@iitp.ru)
|
||||
Vedran Miletić <rivanvx@gmail.com>
|
||||
Jonathan McCrohan (jmccroha@tcd.ie)
|
||||
Vedran Miletić (rivanvx@gmail.com)
|
||||
Marco Miozzo (mmiozzo@cttc.es)
|
||||
Faker Moatamri (faker.moatamri@inria.fr)
|
||||
Mike Moreton (mjvm_ns@hotmail.com)
|
||||
Sidharth Nabar (snabar@uw.edu)
|
||||
Hemanth Narra (hemanth@ittc.ku.edu)
|
||||
Jaume Nin (jnin@cttc.es)
|
||||
Michael Nowatkowski (nowatkom@gmail.com)
|
||||
Duy Nguyen (duy@soe.ucsc.edu)
|
||||
Tommaso Pecorella (tommaso.pecorella@unifi.it)
|
||||
Vikas Pushkar (vikaskupushkar@gmail.com)
|
||||
Josh Pelkey (jpelkey@gatech.edu)
|
||||
Colin Perkins <csp@csperkins.org>
|
||||
Giuseppe Piro (g.piro@poliba.it)
|
||||
@@ -63,7 +73,9 @@ Guangyu Pei (guangyu.pei@boeing.com)
|
||||
Andrea Ranieri <andreran@uno.it>
|
||||
Bruno Ranieri (Yrrsinn@googlemail.com)
|
||||
Ken Renard (kenneth.renard@arl.army.mil)
|
||||
Manuel Requena (mrequena@cttc.es)
|
||||
George F. Riley (riley@ece.gatech.edu)
|
||||
Sebastian Rohde (sebastian.rohde@tu-dortmund.de)
|
||||
Bill Roome (wdr@bell-labs.com)
|
||||
Andrea Sacco (andrea.sacco85@gmail.com)
|
||||
Providence Salumu Munga (Providence.Salumu@gmail.com, Providence.Salumu_Munga@it-sudparis.eu)
|
||||
|
||||
@@ -46,6 +46,19 @@ us a note on ns-developers mailing list.</p>
|
||||
<hr>
|
||||
<h1>Changes from ns-3.13 to ns-3-dev</h1>
|
||||
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
<li>The new class AntennaModel provides an API for modeling the radiation pattern of antennas.
|
||||
</li>
|
||||
<li>The new buildings module introduces an API (classes, helpers, etc)
|
||||
to model the presence of buildings in a wireless network topology.
|
||||
</li>
|
||||
<li>The LENA project's implementation of the LTE Mac Scheduler Interface Specification
|
||||
standardized by the Small Cell Forum (formerly Femto Forum) is now available for
|
||||
use with the LTE module.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li> The Ipv6RawSocketImpl "IcmpFilter" attribute has been removed. Six
|
||||
@@ -83,6 +96,30 @@ New "SendIcmpv6Redirect" attribute (and getter/setter functions) to
|
||||
Ipv6L3Protocol. The behavior is similar to Linux's conf "send_redirects",
|
||||
i.e., enable/disable the ICMPv6 Redirect sending.
|
||||
</li>
|
||||
<li> The SpectrumPhy abstract class now has a new method
|
||||
<pre>virtual Ptr<AntennaModel> GetRxAntenna () = 0;</pre>
|
||||
that all derived classes need to implement in order to integrate properly with the newly added antenna model. In addition, a new member variable "Ptr<AntennaModel> txAntenna" has been added to SpectrumSignalParameters in order to allow derived SpectrumPhy classes to provide information about the antenna model used for the transmission of a waveform.
|
||||
</li>
|
||||
<li> The Ns2CalendarScheduler event scheduler has been removed.
|
||||
</li>
|
||||
<li>
|
||||
ErrorUnit enum has been moved into RateErrorModel class, and symbols EU_BIT, EU_BYTE and EU_PKT have been renamed to RateErrorModel::ERROR_UNIT_BIT, RateErrorModel::ERROR_UNIT_BYTE and RateErrorModel::ERROR_UNIT_PACKET. RateErrorModel class attribute "ErrorUnit" values have also been renamed for consistency, and are now "ERROR_UNIT_BIT", "ERROR_UNIT_BYTE", "ERROR_UNIT_PACKET".
|
||||
</li>
|
||||
<li>
|
||||
QueueMode enum from DropTailQueue and RedQueue classes has been unified and moved to Queueu class. Symbols DropTailQueue::PACKETS and DropTailQueue::BYTES are now named Queue::QUEUE_MODE_PACKETS and DropTailQueue::QUEUE_MODE_BYTES. In addition, DropTailQueue and RedQueue class attributes "Mode" have been renamed for consistency from "Packets" and "Bytes" to "QUEUE_MODE_PACKETS" and "QUEUE_MODE_BYTES".
|
||||
</li>
|
||||
<li>
|
||||
The API of the LTE module has undergone a significant redesign with
|
||||
the merge of the code from the LENA project. The new API is not
|
||||
backwards compatible with the previous version of the LTE module.
|
||||
</li>
|
||||
<li> The Ipv6AddressHelper API has been aligned with the Ipv4AddressHelper API.
|
||||
The helper can be set with a call to Ipv6AddressHelper::SetBase
|
||||
(Ipv6Address network, Ipv6Prefix prefix) instead of NewNetwork
|
||||
(Ipv6Address network, Ipv6Prefix prefix). A new NewAddress (void) method
|
||||
has been added. Typical usage will involve calls to SetBase (), NewNetwork (),
|
||||
and NewAddress (), as in class Ipv4AddressHelper.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to build system:</h2>
|
||||
|
||||
+80
-13
@@ -9,37 +9,104 @@ http://www.nsnam.org including tutorials: http://www.nsnam.org/tutorials.html
|
||||
Consult the file CHANGES.html for more detailed information about changed
|
||||
API and behavior across ns-3 releases.
|
||||
|
||||
Release 3-dev
|
||||
==============
|
||||
Release 3.14
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is available from:
|
||||
This release not yet available.
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
ns-3.14 has been tested on the following platforms. Not all features are
|
||||
available on all platforms; check the Installation page on the project wiki.
|
||||
|
||||
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
|
||||
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
|
||||
- Fedora Core 17 (32/64 bit) with g++-4.7.0
|
||||
- Fedora Core 16 (32/64 bit) with g++-4.6.3
|
||||
- Fedora Core 15 (64 bit) with g++-4.6.3
|
||||
- Ubuntu 11.10 (32 bit) with g++-4.6.1
|
||||
- OS X Lion with g++-4.2.1
|
||||
- OS X Snow Leopard with g++-4.2.1
|
||||
- FreeBSD 8.2 (32 bit) with g++-4.2.1
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- Dual-stacked IPv6 sockets are implemented. An IPv6 socket can accept an IPv4
|
||||
connection, returning the senders address as an IPv4-mapped address
|
||||
(IPV6_V6ONLY socket option is not implemented).
|
||||
- Transport protocol implementations (TCP, UDP) have been refactored to
|
||||
support also IPv6 connections. Dual-stacked IPv6 sockets are implemented.
|
||||
An IPv6 socket can accept an IPv4 connection, returning the senders
|
||||
address as an IPv4-mapped address (IPV6_V6ONLY socket option is not
|
||||
implemented).
|
||||
- The LTE code from the LENA project has been merged, bringin in a
|
||||
significant redesign of the LTE module as well as many new features.
|
||||
- An antenna module is now included, which includes different
|
||||
radiation pattern models. See the corresponding new section of the
|
||||
ns-3 models library documentation for details.
|
||||
- A new buildings module is introduced which allows to model the
|
||||
presence of buildings in a wireless network topology.
|
||||
- New propagation models (OkumuraHata, ITU-R P.1411, ITU-R P.1238)
|
||||
have been added
|
||||
- The Dynamic Source Routing (DSR) MANET routing protocol for IPv4 was added.
|
||||
- A Random Early Detection (RED) queue model has been added.
|
||||
- Ipv6RoutingHelper is now in-line with Ipv4RoutingHelper concerning the RT
|
||||
print functions. Various minor changes made in Ipv6RoutingProtocol and derived
|
||||
classes to make this possible.
|
||||
print functions. Various minor changes made in Ipv6RoutingProtocol and
|
||||
derived classes to make this possible.
|
||||
- New "SendIcmpv6Redirect" attribute (and getter/setter functions) to
|
||||
Ipv6L3Protocol. The behavior is similar to Linux's conf "send_redirects",
|
||||
i.e., enable/disable the ICMPv6 Redirect sending.
|
||||
|
||||
- Longer and more descriptive names are used for error units in RateErrorModel
|
||||
class and queue mode in Queue class. Attributes in those classes are also
|
||||
changed for consistency. See API documentation for details.
|
||||
- The netanim animator is now included with the release.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- bug 1319 - Fix Ipv6RawSocketImpl Icmpv6 filter
|
||||
- bug 631 - RealtimeSimulatorImpl does not handle Ctrl-C with python bindings
|
||||
- bug 603 - Simulator::Next is useless
|
||||
- bug 962 - list of paths to reach objects contains bogus entries
|
||||
- bug 1000 - Make RealtimeSimulatorImpl last until stop
|
||||
- bug 1053 - Need better error diagnostics in ns2-mobility-trace example
|
||||
- bug 1109 - Point out the effects of ArpCache::PendingQueueSize
|
||||
- bug 1179 - Add LTE trace hooks for supporting visualizer
|
||||
- bug 1180 - LTE: Add TX/RX trace support
|
||||
- bug 1273 - Better error message on missing Python development files
|
||||
- bug 1282 - Sleep state and CCA
|
||||
- bug 1283 - PacketSocket::SendTo should return number of bytes
|
||||
- bug 1302 - Flow monitor bug
|
||||
- bug 1304 - Tag information changed after transmission
|
||||
- bug 1313 - Stddev (average.h) returning NaN
|
||||
- bug 1318 - Asserts for IPv6 malformed packets
|
||||
- bug 1357 - IPv6 fragmentation fails due to checks about malformed extensions
|
||||
- bug 1378 - UdpEchoClient::SetFill () does not set packet size correctly
|
||||
- bug 1319 - Fix Ipv6RawSocketImpl Icmpv6 filter
|
||||
- bug 1325 - Python examples get valgrind errors when build subdirectories
|
||||
are specified in waf
|
||||
- bug 1339 - test.py uses the old name for the test runner
|
||||
- bug 1348 - python bindings: deprecated conversion from string constant
|
||||
to ‘char*’
|
||||
- bug 1349 - TypeId.LookupAttributeByName Python bindings missing
|
||||
- bug 1350 - Simulator.ScheduleWithContext Python binding missing
|
||||
- bug 1351 and 1333 - TCP not able to take RTT samples on long delay network
|
||||
- bug 1362 - ICMPv6 does not forward ICMPs to upper layers (and minor fixes to ICMPv6)
|
||||
- bug 1352 - Fixed MapAttributes, previously was mapped to a vector in
|
||||
ObjectPtrContainer and (and key information was dropped).
|
||||
Now the container is a map.
|
||||
- bug 1354 - Building scratch subdir programs is broken
|
||||
- bug 1355 - Visualizer dependencies not detected at buildtime
|
||||
- bug 1357 - IPv6 fragmentation fails due to checks about malformed extensions
|
||||
- bug 1362 - ICMPv6 does not forward ICMPs to upper layers (and minor
|
||||
fixes to ICMPv6)
|
||||
- bug 1376 - wrong wind variable's name
|
||||
- bug 1378 - UdpEchoClient::SetFill () does not set packet size correctly
|
||||
- bug 1379 - lte-multiple-flows example crashes
|
||||
- bug 1380 - lte-phy-uplink example crashes
|
||||
- bug 1391 - .ns3rc does not allow comments as expected
|
||||
- bug 1392 - Modules built report does not clarify C++ or Python
|
||||
- bug 1393 - IPv6 Routing Helper RT Print functions
|
||||
- bug 1395 - AODV DeferredRouteOutputTag missing constructor
|
||||
- bug 1396 - ARP with hardware addresses longer than 6 bytes
|
||||
- bug 1404 - Bound user input in tutorial third.cc program
|
||||
- bug 1406 - waf exits with maximum recursion depth exceeded
|
||||
- bug 1415 - examples-to-run.py doesn't work with command line arguments
|
||||
- bug 1420 - bug 1420: no python bindings for csma-layout
|
||||
|
||||
Known issues
|
||||
------------
|
||||
|
||||
@@ -17,7 +17,7 @@ import Utils
|
||||
from waflib.Errors import WafError
|
||||
|
||||
## https://launchpad.net/pybindgen/
|
||||
REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 797)
|
||||
REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 809)
|
||||
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ smart pointer to avoid memory leaks. These functions are really small
|
||||
convenience functions and their goal is just to save you a small bit of typing.
|
||||
|
||||
CreateObject and Create
|
||||
+++++++++++++++++++++++
|
||||
***********************
|
||||
|
||||
Objects in C++ may be statically, dynamically, or automatically created. This
|
||||
holds true for |ns3| also, but some objects in the system have some additional
|
||||
@@ -150,7 +150,7 @@ counting (e.g. :cpp:class:`Packet`), and use ``CreateObject<B>`` if B derives
|
||||
from :cpp:class:`ns3::Object`.
|
||||
|
||||
Aggregation
|
||||
+++++++++++
|
||||
***********
|
||||
|
||||
The |ns3| object aggregation system is motivated in strong part by a recognition
|
||||
that a common use case for |ns2| has been the use of inheritance and
|
||||
@@ -175,6 +175,9 @@ problems. This design is based on elements of the `Component Object Model
|
||||
binary-level compatibility of replaceable components is not supported and we
|
||||
have tried to simplify the syntax and impact on model developers.
|
||||
|
||||
Exmaples
|
||||
********
|
||||
|
||||
Aggregation example
|
||||
+++++++++++++++++++
|
||||
|
||||
|
||||
+147
-6
@@ -17,18 +17,33 @@ SOURCES = \
|
||||
source/internet-models.rst \
|
||||
source/network.rst \
|
||||
source/emulation-overview.rst \
|
||||
$(SRC)/antenna/doc/source/antenna.rst \
|
||||
$(SRC)/antenna/doc/source/antenna-design.rst \
|
||||
$(SRC)/antenna/doc/source/antenna-user.rst \
|
||||
$(SRC)/antenna/doc/source/antenna-testing.rst \
|
||||
$(SRC)/aodv/doc/aodv.rst \
|
||||
$(SRC)/applications/doc/applications.rst \
|
||||
$(SRC)/bridge/doc/bridge.rst \
|
||||
$(SRC)/buildings/doc/source/buildings.rst \
|
||||
$(SRC)/buildings/doc/source/buildings-design.rst \
|
||||
$(SRC)/buildings/doc/source/buildings-user.rst \
|
||||
$(SRC)/buildings/doc/source/buildings-testing.rst \
|
||||
$(SRC)/buildings/doc/source/buildings-references.rst \
|
||||
$(SRC)/click/doc/click.rst \
|
||||
$(SRC)/csma/doc/csma.rst \
|
||||
$(SRC)/dsdv/doc/dsdv.rst \
|
||||
$(SRC)/dsr/doc/dsr.rst \
|
||||
$(SRC)/mpi/doc/distributed.rst \
|
||||
$(SRC)/energy/doc/energy.rst \
|
||||
$(SRC)/emu/doc/emu.rst \
|
||||
$(SRC)/tap-bridge/doc/tap.rst \
|
||||
$(SRC)/mesh/doc/mesh.rst \
|
||||
$(SRC)/lte/doc/lte.rst \
|
||||
$(SRC)/lte/doc/source/lte.rst \
|
||||
$(SRC)/lte/doc/source/lte-user.rst \
|
||||
$(SRC)/lte/doc/source/lte-design.rst \
|
||||
$(SRC)/lte/doc/source/lte-testing.rst \
|
||||
$(SRC)/lte/doc/source/lte-profiling.rst \
|
||||
$(SRC)/lte/doc/source/lte-references.rst \
|
||||
$(SRC)/propagation/doc/propagation.rst \
|
||||
$(SRC)/network/doc/network-overview.rst \
|
||||
$(SRC)/network/doc/packets.rst \
|
||||
@@ -39,6 +54,7 @@ SOURCES = \
|
||||
$(SRC)/internet/doc/ipv6.rst \
|
||||
$(SRC)/internet/doc/routing-overview.rst \
|
||||
$(SRC)/internet/doc/tcp.rst \
|
||||
$(SRC)/mobility/doc/mobility.rst \
|
||||
$(SRC)/olsr/doc/olsr.rst \
|
||||
$(SRC)/openflow/doc/openflow-switch.rst \
|
||||
$(SRC)/point-to-point/doc/point-to-point.rst \
|
||||
@@ -59,6 +75,7 @@ SOURCES = \
|
||||
SOURCEFIGS = \
|
||||
figures/testbed.dia \
|
||||
figures/emulated-channel.dia \
|
||||
$(SRC)/antenna/doc/source/figures/antenna-coordinate-system.dia \
|
||||
$(SRC)/network/doc/packet.dia \
|
||||
$(SRC)/network/doc/node.dia \
|
||||
$(SRC)/network/doc/buffer.dia \
|
||||
@@ -70,13 +87,95 @@ SOURCEFIGS = \
|
||||
$(SRC)/wifi/doc/WifiArchitecture.dia \
|
||||
$(SRC)/wifi/doc/snir.dia \
|
||||
$(SRC)/wimax/doc/WimaxArchitecture.dia \
|
||||
$(SRC)/lte/doc/lte-transmission.png \
|
||||
$(SRC)/lte/doc/lte-transmission.pdf \
|
||||
$(SRC)/lte/doc/source/figures/ff-mac-saps.dia \
|
||||
$(SRC)/lte/doc/source/figures/ff-example.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-enb-architecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-ue-architecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-profiling-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/eutran-profiling-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-topology.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-data-flow-ul.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-arch-data-rrc-pdcp-rlc.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-epc-e2e-data-protocol-stack.dia \
|
||||
$(SRC)/lte/doc/source/figures/MCS_2_test.eps \
|
||||
$(SRC)/lte/doc/source/figures/MCS_12_test.eps \
|
||||
$(SRC)/lte/doc/source/figures/lena-dual-stripe.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-mcs-index.eps \
|
||||
$(SRC)/lte/doc/source/figures/lenaThrTestCase1.eps \
|
||||
$(SRC)/lte/doc/source/figures/lenaThrTestCase2.eps \
|
||||
$(SRC)/lte/doc/source/figures/runningTime10s.eps \
|
||||
$(SRC)/lte/doc/source/figures/epcRunningTime.eps \
|
||||
$(SRC)/lte/doc/source/figures/propagationModel.eps \
|
||||
$(SRC)/lte/doc/source/figures/simulationTime.eps \
|
||||
$(SRC)/lte/doc/source/figures/epcSimulationTime.eps \
|
||||
$(SRC)/lte/doc/source/figures/epcEutranRunningTime.eps \
|
||||
$(SRC)/lte/doc/source/figures/profiling-memory.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-rlc-implementation-model.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-dl.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-dl.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-rlc-data-txon-ul.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.eps \
|
||||
$(SRC)/lte/doc/source/figures/fading_pedestrian.png \
|
||||
$(SRC)/lte/doc/source/figures/fading_vehicular.png \
|
||||
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \
|
||||
$(SRC)/lte/doc/source/figures/fading_pedestrian.pdf \
|
||||
$(SRC)/lte/doc/source/figures/fading_vehicular.pdf \
|
||||
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_1_4.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_1_4.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_5_8.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_5_8.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_9_12.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_9_12.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_13_16.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_13_16.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_17_20.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_17_20.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_21_24.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_21_24.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_25_28.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_25_28.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_29_29.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_29_29.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_2_test.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_2_test.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_12_test.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_12_test.pdf \
|
||||
$(SRC)/lte/doc/source/figures/MCS_16_test.png \
|
||||
$(SRC)/lte/doc/source/figures/MCS_16_test.pdf \
|
||||
$(SRC)/lte/doc/source/figures/lte-phy-interference.png \
|
||||
$(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \
|
||||
$(SRC)/lte/doc/source/figures/helpers.png \
|
||||
$(SRC)/lte/doc/source/figures/helpers.pdf \
|
||||
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
|
||||
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
|
||||
$(SRC)/uan/doc/auvmobility-classes.dia \
|
||||
$(SRC)/stats/doc/Stat-framework-arch.png \
|
||||
$(SRC)/stats/doc/Wifi-default.png \
|
||||
$(SRC)/netanim/doc/animation-dumbbell.png \
|
||||
$(SRC)/netanim/doc/animation-dumbbell.pdf \
|
||||
$(SRC)/netanim/doc/figures/Dumbbell.png \
|
||||
$(SRC)/netanim/doc/figures/Dumbbell.pdf \
|
||||
$(SRC)/netanim/doc/figures/PacketStatistics.png \
|
||||
$(SRC)/netanim/doc/figures/PacketStatistics.pdf \
|
||||
$(SRC)/netanim/doc/figures/FastForward.png \
|
||||
$(SRC)/netanim/doc/figures/FastForward.pdf \
|
||||
$(SRC)/netanim/doc/figures/Wireless.png \
|
||||
$(SRC)/netanim/doc/figures/Wireless.pdf \
|
||||
$(SRC)/netanim/doc/figures/Precision.png \
|
||||
$(SRC)/netanim/doc/figures/Precision.pdf \
|
||||
$(SRC)/netanim/doc/figures/Persist.png \
|
||||
$(SRC)/netanim/doc/figures/Persist.pdf \
|
||||
$(SRC)/netanim/doc/figures/SimTime.png \
|
||||
$(SRC)/netanim/doc/figures/SimTime.pdf \
|
||||
$(SRC)/netanim/doc/figures/Trajectory.png \
|
||||
$(SRC)/netanim/doc/figures/Trajectory.pdf \
|
||||
$(SRC)/netanim/doc/figures/UpdateRateInterval.png \
|
||||
$(SRC)/netanim/doc/figures/UpdateRateInterval.pdf \
|
||||
$(SRC)/netanim/doc/figures/WithoutPrecision.png \
|
||||
$(SRC)/netanim/doc/figures/WithoutPrecision.pdf \
|
||||
$(SRC)/netanim/doc/figures/WithPrecision.png \
|
||||
$(SRC)/netanim/doc/figures/WithPrecision.pdf \
|
||||
|
||||
# specify figures from which .png and .pdf figures need to be
|
||||
# generated (all dia and eps figures)
|
||||
@@ -87,6 +186,7 @@ IMAGES_EPS = \
|
||||
$(FIGURES)/node.eps \
|
||||
$(FIGURES)/buffer.eps \
|
||||
$(FIGURES)/sockets-overview.eps \
|
||||
$(FIGURES)/antenna-coordinate-system.eps \
|
||||
$(FIGURES)/internet-node-send.eps \
|
||||
$(FIGURES)/internet-node-recv.eps \
|
||||
$(FIGURES)/routing.eps \
|
||||
@@ -94,11 +194,42 @@ IMAGES_EPS = \
|
||||
$(FIGURES)/WifiArchitecture.eps \
|
||||
$(FIGURES)/snir.eps \
|
||||
$(FIGURES)/WimaxArchitecture.eps \
|
||||
$(FIGURES)/ff-mac-saps.eps \
|
||||
$(FIGURES)/ff-example.eps \
|
||||
$(FIGURES)/lte-enb-architecture.eps \
|
||||
$(FIGURES)/lte-ue-architecture.eps \
|
||||
$(FIGURES)/epc-profiling-scenario.eps \
|
||||
$(FIGURES)/eutran-profiling-scenario.eps \
|
||||
$(FIGURES)/lte-interference-test-scenario.eps \
|
||||
$(FIGURES)/epc-topology.eps \
|
||||
$(FIGURES)/epc-data-flow-dl.eps \
|
||||
$(FIGURES)/epc-data-flow-ul.eps \
|
||||
$(FIGURES)/lte-arch-data-rrc-pdcp-rlc.eps \
|
||||
$(FIGURES)/lte-epc-e2e-data-protocol-stack.eps \
|
||||
$(FIGURES)/MCS_2_test.eps \
|
||||
$(FIGURES)/MCS_12_test.eps \
|
||||
$(FIGURES)/lena-dual-stripe.eps \
|
||||
$(FIGURES)/lte-mcs-index.eps \
|
||||
$(FIGURES)/lenaThrTestCase1.eps \
|
||||
$(FIGURES)/lenaThrTestCase2.eps \
|
||||
$(FIGURES)/runningTime10s.eps \
|
||||
$(FIGURES)/epcRunningTime.eps \
|
||||
$(FIGURES)/propagationModel.eps \
|
||||
$(FIGURES)/simulationTime.eps \
|
||||
$(FIGURES)/epcSimulationTime.eps \
|
||||
$(FIGURES)/epcEutranRunningTime.eps \
|
||||
$(FIGURES)/profiling-memory.eps \
|
||||
$(FIGURES)/lte-rlc-implementation-model.eps \
|
||||
$(FIGURES)/lte-rlc-data-txon-dl.eps \
|
||||
$(FIGURES)/lte-rlc-data-retx-dl.eps \
|
||||
$(FIGURES)/lte-rlc-data-txon-ul.eps \
|
||||
$(FIGURES)/lte-rlc-data-retx-ul.eps \
|
||||
$(FIGURES)/auvmobility-classes.eps \
|
||||
|
||||
# rescale pdf figures as necessary
|
||||
$(FIGURES)/testbed.pdf_width = 5in
|
||||
$(FIGURES)/emulated-channel.pdf_width = 6in
|
||||
$(FIGURES)/antenna-coordinate-system.pdf_width = 7cm
|
||||
$(FIGURES)/node.pdf_width = 5in
|
||||
$(FIGURES)/packet.pdf_width = 4in
|
||||
$(FIGURES)/buffer.pdf_width = 15cm
|
||||
@@ -108,7 +239,17 @@ $(FIGURES)/internet-node-recv.pdf_width = 5in
|
||||
$(FIGURES)/routing.pdf_width = 6in
|
||||
$(FIGURES)/routing-specialization.pdf_width = 5in
|
||||
$(FIGURES)/snir.pdf_width = 3in
|
||||
$(FIGURES)/lte-transmission.pdf_width = 3in
|
||||
$(FIGURES)/lte-interference-test-scenario.pdf_width = 3in
|
||||
$(FIGURES)/epc-topology.pdf_width = 4in
|
||||
$(FIGURES)/lte-arch-data-rrc-pdcp-rlc.pdf_width = 3in
|
||||
$(FIGURES)/lte-epc-e2e-data-protocol-stack.pdf_width = 15cm
|
||||
$(FIGURES)/ff-mac-saps.pdf_width = 5in
|
||||
$(FIGURES)/ff-example.pdf_width = 5in
|
||||
$(FIGURES)/lte-rlc-implementation-model.pdf_width = 20in
|
||||
$(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm
|
||||
$(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm
|
||||
$(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm
|
||||
$(FIGURES)/lte-phy-interference.pdf_width = 12cm
|
||||
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
|
||||
|
||||
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
|
||||
|
||||
@@ -18,12 +18,15 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
|
||||
|
||||
organization
|
||||
animation
|
||||
antenna
|
||||
aodv
|
||||
applications
|
||||
bridge
|
||||
buildings
|
||||
click
|
||||
csma
|
||||
dsdv
|
||||
dsr
|
||||
emulation-overview
|
||||
energy
|
||||
flow-monitor
|
||||
@@ -31,6 +34,7 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
|
||||
lte
|
||||
mesh
|
||||
distributed
|
||||
mobility
|
||||
network
|
||||
olsr
|
||||
openflow-switch
|
||||
|
||||
@@ -162,6 +162,7 @@ http://www.nsnam.org/ns-3.x
|
||||
- Documentation
|
||||
|
||||
2. Repoint http://www.nsnam.org/releases/latest to the new page
|
||||
Repoint /var/www/html/doxygen-release to the new release doxygen.
|
||||
|
||||
3. Update the Older Releases page to create an entry for the previous
|
||||
release (there are two such pages, one under Releases and one under
|
||||
|
||||
@@ -278,9 +278,9 @@ A primeira linha do arquivo
|
||||
eventually have to conform to the |ns3| coding standard as described
|
||||
in the file ``doc/codingstd.txt`` or shown on the project web page
|
||||
`here
|
||||
<http://www.nsnam.org/codingstyle.html>`_.
|
||||
<http://www.nsnam.org/developers/contributing-code/coding-style/>`_.
|
||||
|
||||
Este é sempre um assunto um tanto quanto controverso. O projeto |ns3|, tal como a maioria dos projetos de grande porte, adotou um estilo de codificação, para o qual todo o código deve conformar. Se o leitor quiser contribuir com o projeto, deverá estar em conformidade com a codificação que está descrita no arquivo ``doc/codingstd.txt`` ou no `sítio <http://www.nsnam.org/codingstyle.html>`_.
|
||||
Este é sempre um assunto um tanto quanto controverso. O projeto |ns3|, tal como a maioria dos projetos de grande porte, adotou um estilo de codificação, para o qual todo o código deve conformar. Se o leitor quiser contribuir com o projeto, deverá estar em conformidade com a codificação que está descrita no arquivo ``doc/codingstd.txt`` ou no `sítio <http://www.nsnam.org/developers/contributing-code/coding-style/>`_.
|
||||
|
||||
..
|
||||
We recommend that you, well, just get used to the look and feel of |ns3|
|
||||
|
||||
@@ -27,10 +27,10 @@ A Internet
|
||||
aware. The main web site is located at http://www.nsnam.org and
|
||||
provides access to basic information about the |ns3| system. Detailed
|
||||
documentation is available through the main web site at
|
||||
http://www.nsnam.org/documents.html. You can also find documents
|
||||
http://www.nsnam.org/documentation/. You can also find documents
|
||||
relating to the system architecture from this page.
|
||||
|
||||
Há vários recursos importantes que um usuário do |ns3| deve conhecer. O principal está em http://www.nsnam.org e fornece acesso a informações básicas sobre o |ns3|. A documentação detalhada esta disponível no sítio principal através do endereço http://www.nsnam.org/documents.html. Nesta página, também podem ser encontrados documentos relacionados a arquitetura do sistema.
|
||||
Há vários recursos importantes que um usuário do |ns3| deve conhecer. O principal está em http://www.nsnam.org e fornece acesso a informações básicas sobre o |ns3|. A documentação detalhada esta disponível no sítio principal através do endereço http://www.nsnam.org/documentation/. Nesta página, também podem ser encontrados documentos relacionados a arquitetura do sistema.
|
||||
|
||||
..
|
||||
There is a Wiki that complements the main |ns3| web site which you will
|
||||
|
||||
@@ -2996,10 +2996,10 @@ Um objeto |ns3| representando o arquivo pcap
|
||||
Mas os objetos internos são inteiramente diferentes. Por exemplo, o Ptr<PcapFileWrapper> é um ponteiro para um objeto |ns3| que suporta ``Attributes`` e é integrado dentro do sistema de configuração. O Ptr<OutputStreamWrapper>, por outro lado, é um ponteiro para uma referência para um simples objeto contado. Lembre-se sempre de analisar o objeto que você está referenciando antes de fazer suposições sobre os "poderes" que o objeto pode ter.
|
||||
|
||||
..
|
||||
For example, take a look at ``src/network/model/pcap-file-object.h`` in the
|
||||
For example, take a look at ``src/network/utils/pcap-file-wrapper.h`` in the
|
||||
distribution and notice,
|
||||
|
||||
Por exemplo, acesse o arquivo ``src/network/model/pcap-file-object.h`` e observe,
|
||||
Por exemplo, acesse o arquivo ``src/network/utils/pcap-file-wrapper.h`` e observe,
|
||||
|
||||
::
|
||||
|
||||
@@ -3562,10 +3562,10 @@ M
|
||||
uint32_t deviceid);
|
||||
|
||||
..
|
||||
You are encouraged to peruse the Doxygen for class ``TraceHelperForDevice``
|
||||
You are encouraged to peruse the Doxygen for class ``AsciiTraceHelperForDevice``
|
||||
to find the details of these methods; but to summarize ...
|
||||
|
||||
Para maiores detalhes sobre os métodos é interessante consultar a documentação para a classe ``TraceHelperForDevice``; mas para resumir ...
|
||||
Para maiores detalhes sobre os métodos é interessante consultar a documentação para a classe ``AsciiTraceHelperForDevice``; mas para resumir ...
|
||||
|
||||
..
|
||||
There are twice as many methods available for ascii tracing as there were for
|
||||
|
||||
@@ -184,7 +184,7 @@ adhere. If you want to contribute your code to the project, you will
|
||||
eventually have to conform to the |ns3| coding standard as described
|
||||
in the file ``doc/codingstd.txt`` or shown on the project web page
|
||||
`here
|
||||
<http://www.nsnam.org/codingstyle.html>`_.
|
||||
<http://www.nsnam.org/developers/contributing-code/coding-style/>`_.
|
||||
|
||||
We recommend that you, well, just get used to the look and feel of |ns3|
|
||||
code and adopt this standard whenever you are working with our code. All of
|
||||
|
||||
@@ -2168,7 +2168,7 @@ pointer to a reference counted object that is a very lightweight thing.
|
||||
Remember to always look at the object you are referencing before making any
|
||||
assumptions about the "powers" that object may have.
|
||||
|
||||
For example, take a look at ``src/network/model/pcap-file-object.h`` in the
|
||||
For example, take a look at ``src/network/utils/pcap-file-wrapper.h`` in the
|
||||
distribution and notice,
|
||||
|
||||
::
|
||||
@@ -2566,7 +2566,7 @@ Ascii Tracing Device Helper Methods
|
||||
void EnableAscii (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename);
|
||||
void EnableAscii (Ptr<OutputStreamWrapper> stream, uint32_t nodeid, uint32_t deviceid);
|
||||
|
||||
You are encouraged to peruse the Doxygen for class ``TraceHelperForDevice``
|
||||
You are encouraged to peruse the Doxygen for class ``AsciiTraceHelperForDevice``
|
||||
to find the details of these methods; but to summarize ...
|
||||
|
||||
There are twice as many methods available for ascii tracing as there were for
|
||||
|
||||
@@ -58,7 +58,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Set a few attributes
|
||||
Config::SetDefault ("ns3::RateErrorModel::ErrorRate", DoubleValue (0.01));
|
||||
Config::SetDefault ("ns3::RateErrorModel::ErrorUnit", StringValue ("EU_PKT"));
|
||||
Config::SetDefault ("ns3::RateErrorModel::ErrorUnit", StringValue ("ERROR_UNIT_PACKET"));
|
||||
|
||||
Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
|
||||
Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRateValue (DataRate ("448kb/s")));
|
||||
|
||||
@@ -127,10 +127,10 @@ int main (int argc, char** argv)
|
||||
|
||||
NS_LOG_INFO ("Create networks and assign IPv6 Addresses.");
|
||||
Ipv6AddressHelper ipv6;
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i1 = ipv6.Assign (d1);
|
||||
i1.SetRouter (1, true);
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i2 = ipv6.Assign (d2);
|
||||
i2.SetRouter (0, true);
|
||||
|
||||
|
||||
@@ -146,12 +146,12 @@ int main (int argc, char **argv)
|
||||
NS_LOG_INFO ("Assign IPv6 Addresses.");
|
||||
Ipv6AddressHelper ipv6;
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer iic1 = ipv6.Assign (ndc1);
|
||||
iic1.SetRouter (2, true);
|
||||
iic1.SetRouter (1, true);
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer iic2 = ipv6.Assign (ndc2);
|
||||
iic2.SetRouter (0, true);
|
||||
|
||||
|
||||
@@ -104,30 +104,30 @@ int main (int argc, char **argv)
|
||||
NS_LOG_INFO ("Create networks and assign IPv6 Addresses.");
|
||||
Ipv6AddressHelper ipv6;
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i1 = ipv6.Assign (d1);
|
||||
i1.SetRouter (1, true);
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i2 = ipv6.Assign (d2);
|
||||
i2.SetRouter (1, true);
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:3::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:3::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i3 = ipv6.Assign (d3);
|
||||
i3.SetRouter (0, true);
|
||||
i3.SetRouter (1, true);
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:4::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:4::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i4 = ipv6.Assign (d4);
|
||||
i4.SetRouter (0, true);
|
||||
i4.SetRouter (1, true);
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:5::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:5::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i5 = ipv6.Assign (d5);
|
||||
i5.SetRouter (0, true);
|
||||
i5.SetRouter (1, true);
|
||||
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:6::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:6::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i6 = ipv6.Assign (d6);
|
||||
i6.SetRouter (0, true);
|
||||
i6.SetRouter (1, true);
|
||||
|
||||
@@ -137,7 +137,7 @@ int main (int argc, char** argv)
|
||||
Ipv6AddressHelper ipv6;
|
||||
|
||||
/* first subnet */
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
|
||||
NetDeviceContainer tmp;
|
||||
tmp.Add (d1.Get (0)); /* n0 */
|
||||
Ipv6InterfaceContainer iic1 = ipv6.AssignWithoutAddress (tmp); /* n0 interface */
|
||||
@@ -152,7 +152,7 @@ int main (int argc, char** argv)
|
||||
stackHelper.AddAddress (r, iic1.GetInterfaceIndex (1), Ipv6Address ("2001:ABCD::2"));
|
||||
|
||||
/* second subnet R - n1 */
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
|
||||
NetDeviceContainer tmp3;
|
||||
tmp3.Add (d2.Get (0)); /* R */
|
||||
Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */
|
||||
|
||||
@@ -84,7 +84,7 @@ int main (int argc, char** argv)
|
||||
Ipv6AddressHelper ipv6;
|
||||
|
||||
/* first subnet */
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
|
||||
NetDeviceContainer tmp;
|
||||
tmp.Add (d1.Get (0)); /* n0 */
|
||||
Ipv6InterfaceContainer iic1 = ipv6.AssignWithoutAddress (tmp); /* n0 interface */
|
||||
@@ -96,7 +96,7 @@ int main (int argc, char** argv)
|
||||
iic1.Add (iicr1);
|
||||
|
||||
/* second subnet R - n1 */
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
|
||||
NetDeviceContainer tmp3;
|
||||
tmp3.Add (d2.Get (0)); /* R */
|
||||
Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */
|
||||
|
||||
@@ -75,9 +75,11 @@
|
||||
#include "ns3/aodv-module.h"
|
||||
#include "ns3/olsr-module.h"
|
||||
#include "ns3/dsdv-module.h"
|
||||
#include "ns3/dsr-module.h"
|
||||
#include "ns3/applications-module.h"
|
||||
|
||||
using namespace ns3;
|
||||
using namespace dsr;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("manet-routing-compare");
|
||||
|
||||
@@ -188,7 +190,7 @@ RoutingExperiment::CommandSetup (int argc, char **argv)
|
||||
CommandLine cmd;
|
||||
cmd.AddValue ("CSVfileName", "The name of the CSV output file name", m_CSVfileName);
|
||||
cmd.AddValue ("traceMobility", "Enable mobility tracing", m_traceMobility);
|
||||
cmd.AddValue ("protocol", "1=OLSR;2=AODV;3=DSDV", m_protocol);
|
||||
cmd.AddValue ("protocol", "1=OLSR;2=AODV;3=DSDV;4=DSR", m_protocol);
|
||||
cmd.Parse (argc, argv);
|
||||
return m_CSVfileName;
|
||||
}
|
||||
@@ -265,40 +267,6 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
wifiMac.SetType ("ns3::AdhocWifiMac");
|
||||
NetDeviceContainer adhocDevices = wifi.Install (wifiPhy, wifiMac, adhocNodes);
|
||||
|
||||
AodvHelper aodv;
|
||||
OlsrHelper olsr;
|
||||
DsdvHelper dsdv;
|
||||
Ipv4ListRoutingHelper list;
|
||||
|
||||
switch (m_protocol)
|
||||
{
|
||||
case 1:
|
||||
list.Add (olsr, 100);
|
||||
m_protocolName = "OLSR";
|
||||
break;
|
||||
case 2:
|
||||
list.Add (aodv, 100);
|
||||
m_protocolName = "AODV";
|
||||
break;
|
||||
case 3:
|
||||
list.Add (dsdv, 100);
|
||||
m_protocolName = "DSDV";
|
||||
break;
|
||||
default:
|
||||
NS_FATAL_ERROR ("No such protocol:" << m_protocol);
|
||||
}
|
||||
|
||||
InternetStackHelper internet;
|
||||
internet.SetRoutingHelper (list);
|
||||
internet.Install (adhocNodes);
|
||||
|
||||
NS_LOG_INFO ("assigning ip address");
|
||||
|
||||
Ipv4AddressHelper addressAdhoc;
|
||||
addressAdhoc.SetBase ("10.1.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer adhocInterfaces;
|
||||
adhocInterfaces = addressAdhoc.Assign (adhocDevices);
|
||||
|
||||
MobilityHelper mobilityAdhoc;
|
||||
|
||||
ObjectFactory pos;
|
||||
@@ -314,6 +282,53 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
mobilityAdhoc.SetPositionAllocator (taPositionAlloc);
|
||||
mobilityAdhoc.Install (adhocNodes);
|
||||
|
||||
AodvHelper aodv;
|
||||
OlsrHelper olsr;
|
||||
DsdvHelper dsdv;
|
||||
DsrHelper dsr;
|
||||
DsrMainHelper dsrMain;
|
||||
Ipv4ListRoutingHelper list;
|
||||
InternetStackHelper internet;
|
||||
|
||||
switch (m_protocol)
|
||||
{
|
||||
case 1:
|
||||
list.Add (olsr, 100);
|
||||
m_protocolName = "OLSR";
|
||||
break;
|
||||
case 2:
|
||||
list.Add (aodv, 100);
|
||||
m_protocolName = "AODV";
|
||||
break;
|
||||
case 3:
|
||||
list.Add (dsdv, 100);
|
||||
m_protocolName = "DSDV";
|
||||
break;
|
||||
case 4:
|
||||
m_protocolName = "DSR";
|
||||
break;
|
||||
default:
|
||||
NS_FATAL_ERROR ("No such protocol:" << m_protocol);
|
||||
}
|
||||
|
||||
if (m_protocol < 4)
|
||||
{
|
||||
internet.SetRoutingHelper (list);
|
||||
internet.Install (adhocNodes);
|
||||
}
|
||||
else if (m_protocol == 4)
|
||||
{
|
||||
internet.Install (adhocNodes);
|
||||
dsrMain.Install (dsr, adhocNodes);
|
||||
}
|
||||
|
||||
NS_LOG_INFO ("assigning ip address");
|
||||
|
||||
Ipv4AddressHelper addressAdhoc;
|
||||
addressAdhoc.SetBase ("10.1.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer adhocInterfaces;
|
||||
adhocInterfaces = addressAdhoc.Assign (adhocDevices);
|
||||
|
||||
OnOffHelper onoff1 ("ns3::UdpSocketFactory",Address ());
|
||||
onoff1.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff1.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
@@ -327,7 +342,7 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
|
||||
UniformVariable var;
|
||||
ApplicationContainer temp = onoff1.Install (adhocNodes.Get (i + nSinks));
|
||||
temp.Start (Seconds (var.GetValue (50.0,51.0)));
|
||||
temp.Start (Seconds (var.GetValue (100.0,101.0)));
|
||||
temp.Stop (Seconds (TotalTime));
|
||||
}
|
||||
|
||||
@@ -354,7 +369,7 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
//Ptr<OutputStreamWrapper> osw = ascii.CreateFileStream ( (tr_name + ".tr").c_str());
|
||||
//wifiPhy.EnableAsciiAll (osw);
|
||||
std::ofstream os;
|
||||
os.open ((tr_name + ".mob").c_str());
|
||||
os.open ((tr_name + ".mob").c_str ());
|
||||
MobilityHelper::EnableAsciiAll (os);
|
||||
|
||||
//Ptr<FlowMonitor> flowmon;
|
||||
|
||||
@@ -128,10 +128,10 @@ int main (int argc, char** argv)
|
||||
|
||||
NS_LOG_INFO ("Create networks and assign IPv6 Addresses.");
|
||||
Ipv6AddressHelper ipv6;
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i1 = ipv6.Assign (d1);
|
||||
i1.SetRouter (1, true);
|
||||
ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64);
|
||||
ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i2 = ipv6.Assign (d2);
|
||||
i2.SetRouter (0, true);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ def build(bld):
|
||||
obj.source = 'simple-routing-ping6.cc'
|
||||
|
||||
obj = bld.create_ns3_program('manet-routing-compare',
|
||||
['wifi', 'dsdv', 'aodv', 'olsr', 'internet', 'applications'])
|
||||
['wifi', 'dsr', 'dsdv', 'aodv', 'olsr', 'internet', 'applications'])
|
||||
obj.source = 'manet-routing-compare.cc'
|
||||
|
||||
bld.register_ns3_script('simple-routing-ping6.py', ['csma', 'internet', 'applications'])
|
||||
|
||||
@@ -171,8 +171,8 @@ int main (int argc, char *argv[]) {
|
||||
appSink->AddApplication (receiver);
|
||||
receiver->SetStartTime (Seconds (0));
|
||||
|
||||
// Config::Set("/NodeList/*/ApplicationList/*/$Sender/Destination",
|
||||
// Ipv4AddressValue("192.168.0.2"));
|
||||
Config::Set ("/NodeList/*/ApplicationList/*/$Sender/Destination",
|
||||
Ipv4AddressValue ("192.168.0.2"));
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,6 +52,13 @@ main (int argc, char *argv[])
|
||||
|
||||
cmd.Parse (argc,argv);
|
||||
|
||||
if (nWifi > 18)
|
||||
{
|
||||
std::cout << "Number of wifi nodes " << nWifi <<
|
||||
" specified exceeds the mobility bounding box" << std::endl;
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
|
||||
|
||||
@@ -84,7 +84,7 @@ main (int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
Ipv6AddressHelper ipv6;
|
||||
ipv6.NewNetwork ("2001:0000:f00d:cafe::", 64);
|
||||
ipv6.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i6 = ipv6.Assign (d);
|
||||
serverAddress = Address(i6.GetAddress (1,1));
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ main (int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
Ipv6AddressHelper ipv6;
|
||||
ipv6.NewNetwork ("2001:0000:f00d:cafe::", 64);
|
||||
ipv6.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i6 = ipv6.Assign (d);
|
||||
serverAddress = Address(i6.GetAddress (1,1));
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ main (int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
Ipv6AddressHelper ipv6;
|
||||
ipv6.NewNetwork ("2001:0000:f00d:cafe::", 64);
|
||||
ipv6.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i6 = ipv6.Assign (d);
|
||||
serverAddress = Address(i6.GetAddress (1,1));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
callback_classes = [
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,173 @@
|
||||
EPSTOPDF = epstopdf
|
||||
DIA = dia
|
||||
CONVERT = convert
|
||||
|
||||
SOURCE = source
|
||||
FIGURES = $(SOURCE)/figures
|
||||
|
||||
# specify figures from which .png and .pdf figures need to be
|
||||
# generated (all dia and eps figures)
|
||||
IMAGES_EPS = ${FIGURES}/antenna-coordinate-system.eps
|
||||
|
||||
# specify figures for build process (all eps figures)
|
||||
GRAPHS_EPS =
|
||||
|
||||
# rescale pdf figures as necessary
|
||||
$(FIGURES)/antenna-coordinate-system.pdf_width = 3in
|
||||
|
||||
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
|
||||
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
|
||||
|
||||
IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
|
||||
|
||||
%.eps : %.dia; $(DIA) -t eps $< -e $@
|
||||
%.png : %.dia; $(DIA) -t png $< -e $@
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
|
||||
GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png}
|
||||
GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf}
|
||||
|
||||
GRAPHS = $(GRAPHS_EPS) $(GRAPHS_PNG) $(GRAPHS_PDF)
|
||||
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE)
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
-rm -f $(IMAGES_PNG)
|
||||
-rm -f $(IMAGES_PDF)
|
||||
-rm -f $(GRAPHS_PNG)
|
||||
-rm -f $(GRAPHS_PDF)
|
||||
|
||||
frag: pickle
|
||||
@if test ! -d $(BUILDDIR)/frag; then mkdir $(BUILDDIR)/frag; fi
|
||||
pushd $(BUILDDIR)/frag && ../../pickle-to-xml.py ../pickle/index.fpickle > navigation.xml && popd
|
||||
cp -r $(BUILDDIR)/pickle/_images $(BUILDDIR)/frag
|
||||
|
||||
html: $(IMAGES) ${GRAPHS}
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml: $(IMAGES)
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml: $(IMAGES)
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle: $(IMAGES)
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json: $(IMAGES)
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp: $(IMAGES)
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp: $(IMAGES)
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ns-3.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ns-3.qhc"
|
||||
|
||||
devhelp: $(IMAGES)
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/ns-3"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ns-3"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub: $(IMAGES)
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex: $(IMAGES) ${GRAPHS}
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf: $(IMAGES) ${GRAPHS}
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
make -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text: $(IMAGES)
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man: $(IMAGES)
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
changes: $(IMAGES)
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck: $(IMAGEs)
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest: $(IMAGES)
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMPFILE=`mktemp`
|
||||
|
||||
echo "\documentclass{book}
|
||||
\usepackage{pdfpages}
|
||||
\begin{document}
|
||||
\includepdf[width=${1},fitpaper]{${2}}
|
||||
\end{document}" >${TMPFILE}.tex
|
||||
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
|
||||
cp ${TMPFILE}.pdf ${3}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
.. include:: replace.txt
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
Design documentation
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
--------
|
||||
Overview
|
||||
--------
|
||||
|
||||
The Antenna module provides:
|
||||
|
||||
#. a new base class (AntennaModel) that provides an interface for the modeling of the radiation pattern of an antenna;
|
||||
#. a set of classes derived from this base class that each models the radiation pattern of different types of antennas.
|
||||
|
||||
|
||||
------------
|
||||
AntennaModel
|
||||
------------
|
||||
|
||||
The AntennaModel uses the coordinate system adopted in [Balanis]_ and
|
||||
depicted in Figure :ref:`fig-antenna-coordinate-system`. This system
|
||||
is obtained by traslating the cartesian coordinate system used by the
|
||||
ns-3 MobilityModel into the new origin :math:`o` which is the location
|
||||
of the antenna, and then transforming the coordinates of every generic
|
||||
point :math:`p` of the space from cartesian coordinates
|
||||
:math:`(x,y,z)` into spherical coordinates
|
||||
:math:`(r, \theta,\phi)`.
|
||||
The antenna model neglects the radial component :math:`r`, and
|
||||
only considers the angle components :math:`(\theta, \phi)`. An antenna
|
||||
radiation pattern is then expressed as a mathematical function
|
||||
:math:`g(\theta, \phi) \longrightarrow \mathcal{R}` that returns the
|
||||
gain (in dB) for each possible direction of
|
||||
transmission/reception. All angles are expressed in radians.
|
||||
|
||||
|
||||
.. _fig-antenna-coordinate-system:
|
||||
|
||||
.. figure:: figures/antenna-coordinate-system.*
|
||||
:align: center
|
||||
|
||||
Coordinate system of the AntennaModel
|
||||
|
||||
---------------
|
||||
Provided models
|
||||
---------------
|
||||
|
||||
In this section we describe the antenna radiation pattern models that
|
||||
are included within the antenna module.
|
||||
|
||||
|
||||
IsotropicAntennaModel
|
||||
+++++++++++++++++++++
|
||||
|
||||
This antenna radiation pattern model provides a unitary gain (0 dB)
|
||||
for all direction.
|
||||
|
||||
|
||||
|
||||
CosineAntennaModel
|
||||
++++++++++++++++++
|
||||
|
||||
This is the cosine model described in [Chunjian]_: the antenna gain is
|
||||
determined as:
|
||||
|
||||
.. math::
|
||||
|
||||
g(\phi, \theta) = \cos^{n} \left(\frac{\phi - \phi_{0}}{2} \right)
|
||||
|
||||
where :math:`\phi_{0}` is the azimuthal orientation of the antenna
|
||||
(i.e., its direction of maximum gain) and the exponential
|
||||
|
||||
.. math::
|
||||
|
||||
n = -\frac{3}{20 \log_{10} \left( \cos \frac{\phi_{3dB}}{4} \right)}
|
||||
|
||||
determines the desired 3dB beamwidth :math:`\phi_{3dB}`.
|
||||
|
||||
A major difference between the model of [Chunjian]_ and the one
|
||||
implemented in the class CosineAntennaModel is that only the element
|
||||
factor (i.e., what described by the above formulas) is considered. In
|
||||
fact, [Chunjian]_ also considered an additional antenna array
|
||||
factor. The reason why the latter is excluded is that we expect that
|
||||
the average user would desire to specify a given beamwidth exactly,
|
||||
without adding an array factor at a latter stage which would in
|
||||
practice alter the effective beamwidth of the resulting radiation
|
||||
pattern.
|
||||
|
||||
|
||||
|
||||
ParabolicAntennaModel
|
||||
+++++++++++++++++++++
|
||||
|
||||
This model is based on the parabolic approximation of the main lobe radiation pattern. It is often used in the context of cellular system to model the radiation pattern of a cell sector, see for instance [R4-092042]_ and [Calcev]_. The antenna gain in dB is determined as:
|
||||
|
||||
.. math::
|
||||
|
||||
g_{dB}(\phi, \theta) = -\min \left( 12 \left(\frac{\phi - \phi_{0}}{\phi_{3dB}} \right)^2, A_{max} \right)
|
||||
|
||||
where :math:`\phi_{0}` is the azimuthal orientation of the antenna
|
||||
(i.e., its direction of maximum gain), :math:`\phi_{3dB}` is its 3 dB
|
||||
beamwidth, and :math:`A_{max}` is the maximum attenuation in dB of the
|
||||
antenna.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. [Balanis] C.A. Balanis, "Antenna Theory - Analysis and Design", Wiley, 2nd Ed.
|
||||
|
||||
.. [Chunjian] Li Chunjian, "Efficient Antenna Patterns for
|
||||
Three-Sector WCDMA Systems", Master of Science Thesis, Chalmers
|
||||
University of Technology, Göteborg, Sweden, 2003
|
||||
|
||||
.. [Calcev] George Calcev and Matt Dillon, "Antenna Tilt Control in
|
||||
CDMA Networks", in Proc. of the 2nd Annual International Wireless
|
||||
Internet Conference (WICON), 2006
|
||||
|
||||
.. [R4-092042] 3GPP TSG RAN WG4 (Radio) Meeting #51, R4-092042, Simulation
|
||||
assumptions and parameters for FDD HeNB RF requirements.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
+++++++++++++++++++++++++++++++++++++
|
||||
Testing Documentation
|
||||
+++++++++++++++++++++++++++++++++++++
|
||||
|
||||
In this section we describe the test suites included with the antenna
|
||||
module that verify its correct functionality.
|
||||
|
||||
|
||||
Angles
|
||||
------
|
||||
|
||||
The unit test suite ``angles`` verifies that the Angles class is
|
||||
constructed properly by correct conversion from 3D cartesian
|
||||
coordinates according to the available methods (construction from a
|
||||
single vector and from a pair of vectors). For each method, several
|
||||
test cases are provided that compare the values :math:`(\phi, \theta)`
|
||||
determied by the constructor to known reference values. The test
|
||||
passes if for each case the values are equal to the reference up to a
|
||||
tolerance of :math:`10^{-10}` which accounts for numerical errors.
|
||||
|
||||
|
||||
DegreesToRadians
|
||||
----------------
|
||||
|
||||
The unit test suite ``degrees-radians`` verifies that the methods
|
||||
``DegreesToRadians`` and ``RadiansToDegrees`` work properly by
|
||||
comparing with known reference values in a number of test
|
||||
cases. Each test case passes if the comparison is equal up to a
|
||||
tolerance of :math:`10^{-10}` which accounts for numerical errors.
|
||||
|
||||
|
||||
|
||||
IsotropicAntennaModel
|
||||
---------------------
|
||||
|
||||
The unit test suite ``isotropic-antenna-model`` checks that the
|
||||
``IsotropicAntennaModel`` class works properly, i.e., returns always a
|
||||
0dB gain regardless of the direction.
|
||||
|
||||
|
||||
|
||||
CosineAntennaModel
|
||||
------------------
|
||||
|
||||
The unit test suite ``cosine-antenna-model`` checks that the
|
||||
``CosineAntennaModel`` class works properly. Several test cases are
|
||||
provided that check for the antenna gain value calculated at different
|
||||
directions and for different values of the orientation, the reference
|
||||
gain and the beamwidth. The reference gain is calculated by hand. Each
|
||||
test case passes if the reference gain in dB is equal to the value returned
|
||||
by ``CosineAntennaModel`` within a tolerance of 0.001, which accounts
|
||||
for the approximation done for the calculation of the reference
|
||||
values.
|
||||
|
||||
|
||||
|
||||
ParabolicAntennaModel
|
||||
---------------------
|
||||
|
||||
The unit test suite ``parabolic-antenna-model`` checks that the
|
||||
``ParabolicAntennaModel`` class works properly. Several test cases are
|
||||
provided that check for the antenna gain value calculated at different
|
||||
directions and for different values of the orientation, the maximum attenuation
|
||||
and the beamwidth. The reference gain is calculated by hand. Each
|
||||
test case passes if the reference gain in dB is equal to the value returned
|
||||
by ``ParabolicAntennaModel`` within a tolerance of 0.001, which accounts
|
||||
for the approximation done for the calculation of the reference
|
||||
values.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. include:: replace.txt
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
User Documentation
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
The antenna moduled can be used with all the wireless technologies and
|
||||
physical layer models that support it. Currently, this includes
|
||||
the physical layer models based on the SpectrumPhy. Please refer to
|
||||
the documentation of each of these models for details.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
#####################################################
|
||||
Antenna Module
|
||||
#####################################################
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
antenna-design
|
||||
antenna-user
|
||||
antenna-testing
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ns-3 documentation build configuration file, created by
|
||||
# sphinx-quickstart on Tue Dec 14 09:00:39 2010.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.pngmath']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'LENA'
|
||||
copyright = u'2011-2012, CTTC'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = 'M2'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = 'M2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
#htmlhelp_basename = 'ns-3doc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
#latex_paper_size = 'letter'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#latex_font_size = '10pt'
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('antenna', 'antenna.tex', u'Antenna Module Documentation', u'Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'ns-3-model-library', u'ns-3 Model Library',
|
||||
[u'ns-3 project'], 1)
|
||||
]
|
||||
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
|
||||
#####################################################
|
||||
Antenna Module
|
||||
#####################################################
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
antenna-design
|
||||
antenna-user
|
||||
antenna-testing
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.. |ns3| replace:: *ns-3*
|
||||
|
||||
.. |ns2| replace:: *ns-2*
|
||||
@@ -0,0 +1,89 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011, 2012 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <cmath>
|
||||
#include "angles.h"
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Angles");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
double DegreesToRadians (double degrees)
|
||||
{
|
||||
return degrees * M_PI / 180.0;
|
||||
|
||||
}
|
||||
|
||||
double RadiansToDegrees (double radians)
|
||||
{
|
||||
return radians * 180.0 / M_PI;
|
||||
}
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, const Angles& a)
|
||||
{
|
||||
os << "(" << a.phi << ", " << a.theta << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
std::istream &operator >> (std::istream &is, Angles &a)
|
||||
{
|
||||
char c;
|
||||
is >> a.phi >> c >> a.theta;
|
||||
if (c != ':')
|
||||
{
|
||||
is.setstate (std::ios_base::failbit);
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Angles::Angles ()
|
||||
: phi (0),
|
||||
theta (0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Angles::Angles (double p, double t)
|
||||
: phi (p),
|
||||
theta (t)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Angles::Angles (Vector v)
|
||||
: phi (atan2 (v.y, v.x)),
|
||||
theta (acos (v.z / sqrt (v.x*v.x + v.y*v.y + v.z*v.z)))
|
||||
{
|
||||
}
|
||||
|
||||
Angles::Angles (Vector v, Vector o)
|
||||
: phi (atan2 (v.y - o.y, v.x - o.x)),
|
||||
theta (acos ((v.z - o.z) / CalculateDistance (v, o)))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011, 2012 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef ANGLES_H
|
||||
#define ANGLES_H
|
||||
|
||||
|
||||
#include <ns3/vector.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
/**
|
||||
* \brief converts degrees to radians
|
||||
*
|
||||
* \param degrees the angle in degrees
|
||||
*
|
||||
* \return the angle in radians
|
||||
*/
|
||||
double DegreesToRadians (double degrees);
|
||||
|
||||
/**
|
||||
* \brief converts radians to degrees
|
||||
*
|
||||
* \param radians the angle in radians
|
||||
*
|
||||
* \return the angle in degrees
|
||||
*/
|
||||
double RadiansToDegrees (double radians);
|
||||
|
||||
/**
|
||||
*
|
||||
* struct holding the azimuth and inclination angles of spherical
|
||||
* coordinates. The notation is the one used in "Antenna Theory - Analysis
|
||||
* and Design", C.A. Balanis, Wiley, 2nd Ed., section 2.2 "Radiation
|
||||
* pattern".
|
||||
* This notation corresponds to the standard spherical coordinates, with phi
|
||||
* measured counterclockwise in the x-y plane off the x-axis, and
|
||||
* theta measured off the z-axis.
|
||||
*
|
||||
* ^
|
||||
* z |
|
||||
* |_ theta
|
||||
* | \
|
||||
* | /|
|
||||
* |/ | y
|
||||
* +-------->
|
||||
* / \|
|
||||
* /___/
|
||||
* x / phi
|
||||
* |/
|
||||
*
|
||||
*/
|
||||
struct Angles
|
||||
{
|
||||
/**
|
||||
* default constructor, will initialize phi and theta to zero
|
||||
*
|
||||
*/
|
||||
Angles ();
|
||||
|
||||
/**
|
||||
* this constructor allows to specify phi and theta
|
||||
*
|
||||
* \param phi the azimuth angle in radians
|
||||
* \param theta the inclination angle in radians
|
||||
*
|
||||
*/
|
||||
Angles (double phi, double theta);
|
||||
|
||||
/**
|
||||
* this constructor will initialize phi and theta by converting the
|
||||
* given 3D vector from cartesian coordinates to spherical coordinates
|
||||
*
|
||||
* \param v the 3D vector in cartesian coordinates
|
||||
*
|
||||
*/
|
||||
Angles (Vector v);
|
||||
|
||||
/**
|
||||
* this constructor initializes an Angles instance with the angles
|
||||
* of the spherical coordinates of point v respect to point o
|
||||
*
|
||||
* \param v the point (in cartesian coordinates) for which the angles are determined
|
||||
* \param o the origin (in cartesian coordinates) of the spherical coordinate system
|
||||
*
|
||||
*/
|
||||
Angles (Vector v, Vector o);
|
||||
|
||||
/**
|
||||
* the azimuth angle in radians
|
||||
*
|
||||
*/
|
||||
double phi;
|
||||
|
||||
/**
|
||||
* the inclination angle in radians
|
||||
*
|
||||
*/
|
||||
double theta;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* print a struct Angles to output
|
||||
*
|
||||
* \param os the output stream
|
||||
* \param a the Angles struct
|
||||
*
|
||||
* \return a reference to the output stream
|
||||
*/
|
||||
std::ostream& operator<< ( std::ostream& os, const Angles& a);
|
||||
|
||||
/**
|
||||
* initialize a struct Angles from input
|
||||
*
|
||||
* \param is the input stream
|
||||
* \param a the Angles struct
|
||||
*
|
||||
* \return a reference to the input stream
|
||||
*/
|
||||
std::istream &operator >> (std::istream &is, Angles &a);
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif // ANGLES_H
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@@ -15,44 +15,40 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Giuseppe Piro <g.piro@poliba.it>
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef ENB_LTE_SPECTRUM_PHY_H
|
||||
#define ENB_LTE_SPECTRUM_PHY_H
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <cmath>
|
||||
#include "antenna-model.h"
|
||||
|
||||
|
||||
#include "lte-spectrum-phy.h"
|
||||
NS_LOG_COMPONENT_DEFINE ("AntennaModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class LteNetDevice;
|
||||
class EnbNetDevice;
|
||||
NS_OBJECT_ENSURE_REGISTERED (AntennaModel);
|
||||
|
||||
/**
|
||||
* \ingroup lte
|
||||
*
|
||||
* The EnbLteSpectrumPhy models the UL/DL physical layer for the eNodeB device
|
||||
*/
|
||||
class EnbLteSpectrumPhy : public LteSpectrumPhy
|
||||
|
||||
AntennaModel::AntennaModel ()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
EnbLteSpectrumPhy ();
|
||||
virtual ~EnbLteSpectrumPhy ();
|
||||
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
void CalcSinrValues (Ptr <const SpectrumValue> rxPsd, Ptr <const SpectrumValue> noise);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
AntennaModel::~AntennaModel ()
|
||||
{
|
||||
}
|
||||
|
||||
TypeId
|
||||
AntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::AntennaModel")
|
||||
.SetParent<Object> ()
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* ENB_LTE_SPECTRUM_PHY_H */
|
||||
@@ -0,0 +1,75 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef ANTENNA_MODEL_H
|
||||
#define ANTENNA_MODEL_H
|
||||
|
||||
|
||||
#include <ns3/object.h>
|
||||
#include <ns3/angles.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup antenna
|
||||
*
|
||||
* \brief interface for antenna radiation pattern models
|
||||
*
|
||||
* This class provides an interface for the definition of antenna
|
||||
* radiation pattern models. This interface is based on the use of
|
||||
* spherical coordinates, in particular of the azimuth and inclination
|
||||
* angles. This choice is the one proposed "Antenna Theory - Analysis
|
||||
* and Design", C.A. Balanis, Wiley, 2nd Ed., see in particular
|
||||
* section 2.2 "Radiation pattern".
|
||||
*
|
||||
*
|
||||
*/
|
||||
class AntennaModel : public Object
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AntennaModel ();
|
||||
virtual ~AntennaModel ();
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId ();
|
||||
|
||||
|
||||
/**
|
||||
* this method is expected to be re-implemented by each antenna model
|
||||
*
|
||||
* \param the spherical angles at which the radiation pattern should
|
||||
* be evaluated
|
||||
*
|
||||
* \return the power gain in dBi of the antenna radiation pattern at
|
||||
* the specified angles; dBi means dB with respect to the gain of an
|
||||
* isotropic radiator. Since a power gain is used, the efficiency of
|
||||
* the antenna is expected to be included in the gain value.
|
||||
*/
|
||||
virtual double GetGainDb (Angles a) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif // ANTENNA_MODEL_H
|
||||
@@ -0,0 +1,127 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/double.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "antenna-model.h"
|
||||
#include "cosine-antenna-model.h"
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("CosineAntennaModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (CosineAntennaModel);
|
||||
|
||||
|
||||
TypeId
|
||||
CosineAntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::CosineAntennaModel")
|
||||
.SetParent<AntennaModel> ()
|
||||
.AddConstructor<CosineAntennaModel> ()
|
||||
.AddAttribute ("Beamwidth",
|
||||
"The 3dB beamwidth (degrees)",
|
||||
DoubleValue (60),
|
||||
MakeDoubleAccessor (&CosineAntennaModel::SetBeamwidth,
|
||||
&CosineAntennaModel::GetBeamwidth),
|
||||
MakeDoubleChecker<double> (0, 180))
|
||||
.AddAttribute ("Orientation",
|
||||
"The angle (degrees) that expresses the orientation of the antenna on the x-y plane relative to the x axis",
|
||||
DoubleValue (0.0),
|
||||
MakeDoubleAccessor (&CosineAntennaModel::SetOrientation,
|
||||
&CosineAntennaModel::GetOrientation),
|
||||
MakeDoubleChecker<double> (-360, 360))
|
||||
.AddAttribute ("MaxGain",
|
||||
"The gain (dB) at the antenna boresight (the direction of maximum gain)",
|
||||
DoubleValue (0.0),
|
||||
MakeDoubleAccessor (&CosineAntennaModel::m_maxGain),
|
||||
MakeDoubleChecker<double> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
CosineAntennaModel::SetBeamwidth (double beamwidthDegrees)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << beamwidthDegrees);
|
||||
m_beamwidthRadians = DegreesToRadians (beamwidthDegrees);
|
||||
m_exponent = -3.0 / (20*log10 (cos (m_beamwidthRadians / 4.0)));
|
||||
NS_LOG_LOGIC (this << " m_exponent = " << m_exponent);
|
||||
}
|
||||
|
||||
double
|
||||
CosineAntennaModel::GetBeamwidth () const
|
||||
{
|
||||
return RadiansToDegrees (m_beamwidthRadians);
|
||||
}
|
||||
|
||||
void
|
||||
CosineAntennaModel::SetOrientation (double orientationDegrees)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << orientationDegrees);
|
||||
m_orientationRadians = DegreesToRadians (orientationDegrees);
|
||||
}
|
||||
|
||||
double
|
||||
CosineAntennaModel::GetOrientation () const
|
||||
{
|
||||
return RadiansToDegrees (m_orientationRadians);
|
||||
}
|
||||
|
||||
double
|
||||
CosineAntennaModel::GetGainDb (Angles a)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << a);
|
||||
// azimuth angle w.r.t. the reference system of the antenna
|
||||
double phi = a.phi - m_orientationRadians;
|
||||
|
||||
// make sure phi is in (-pi, pi]
|
||||
while (phi <= -M_PI)
|
||||
{
|
||||
phi += M_PI+M_PI;
|
||||
}
|
||||
while (phi > M_PI)
|
||||
{
|
||||
phi -= M_PI+M_PI;
|
||||
}
|
||||
|
||||
NS_LOG_LOGIC ("phi = " << phi );
|
||||
|
||||
// element factor: amplitude gain of a single antenna element in linear units
|
||||
double ef = pow (cos (phi / 2.0), m_exponent);
|
||||
|
||||
// the array factor is not considered. Note that if we did consider
|
||||
// the array factor, the actual beamwidth would change, and in
|
||||
// particular it would be different from the one specified by the
|
||||
// user. Hence it is not desirable to use the array factor, for the
|
||||
// ease of use of this model.
|
||||
|
||||
double gainDb = 20*log10 (ef);
|
||||
NS_LOG_LOGIC ("gain = " << gainDb << " + " << m_maxGain << " dB");
|
||||
return gainDb + m_maxGain;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef COSINE_ANTENNA_MODEL_H
|
||||
#define COSINE_ANTENNA_MODEL_H
|
||||
|
||||
|
||||
#include <ns3/object.h>
|
||||
#include <ns3/antenna-model.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
*
|
||||
* \brief Cosine Antenna Model
|
||||
*
|
||||
* This class implements the cosine model as described in:
|
||||
*
|
||||
* Li Chunjian, "Efficient Antenna Patterns for Three-Sector WCDMA Systems"
|
||||
*
|
||||
* Note that only the element factor of the above model is
|
||||
* considered. Also, an additional constant gain is added to model the
|
||||
* radiation pattern on the vertical plane (to account for the fact
|
||||
* that the elevation angle is not included in the model).
|
||||
*/
|
||||
class CosineAntennaModel : public AntennaModel
|
||||
{
|
||||
public:
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId ();
|
||||
|
||||
// inherited from AntennaModel
|
||||
virtual double GetGainDb (Angles a);
|
||||
|
||||
|
||||
// attribute getters/setters
|
||||
void SetBeamwidth (double beamwidthDegrees);
|
||||
double GetBeamwidth () const;
|
||||
void SetOrientation (double orientationDegrees);
|
||||
double GetOrientation () const;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* this is the variable "n" in the paper by Chunjian
|
||||
*
|
||||
*/
|
||||
double m_exponent;
|
||||
|
||||
double m_beamwidthRadians;
|
||||
|
||||
double m_orientationRadians;
|
||||
|
||||
double m_maxGain;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
#endif // COSINE_ANTENNA_MODEL_H
|
||||
@@ -0,0 +1,58 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
|
||||
#include <ns3/log.h>
|
||||
|
||||
#include "antenna-model.h"
|
||||
#include "isotropic-antenna-model.h"
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("IsotropicAntennaModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (IsotropicAntennaModel);
|
||||
|
||||
|
||||
TypeId
|
||||
IsotropicAntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::IsotropicAntennaModel")
|
||||
.SetParent<AntennaModel> ()
|
||||
.AddConstructor<IsotropicAntennaModel> ()
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
IsotropicAntennaModel::IsotropicAntennaModel ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
double
|
||||
IsotropicAntennaModel::GetGainDb (Angles a)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << a);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@@ -15,44 +15,38 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Giuseppe Piro <g.piro@poliba.it>
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef UE_LTE_SPECTRUM_PHY_H
|
||||
#define UE_LTE_SPECTRUM_PHY_H
|
||||
#ifndef ISOTROPIC_ANTENNA_MODEL_H
|
||||
#define ISOTROPIC_ANTENNA_MODEL_H
|
||||
|
||||
|
||||
#include "lte-spectrum-phy.h"
|
||||
#include <ns3/object.h>
|
||||
#include <ns3/antenna-model.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class LteNetDevice;
|
||||
class EnbNetDevice;
|
||||
|
||||
/**
|
||||
* \ingroup lte
|
||||
*
|
||||
* The UeLteSpectrumPhy models the UL/DL physical layer for the UE
|
||||
* \brief Isotropic antenna model
|
||||
*
|
||||
* This is the simplest antenna model. The gain of this antenna is unitary (=0dB) in all directions.
|
||||
*/
|
||||
class UeLteSpectrumPhy : public LteSpectrumPhy
|
||||
class IsotropicAntennaModel : public AntennaModel
|
||||
{
|
||||
|
||||
public:
|
||||
UeLteSpectrumPhy ();
|
||||
virtual ~UeLteSpectrumPhy ();
|
||||
|
||||
static TypeId GetTypeId (void);
|
||||
IsotropicAntennaModel ();
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId ();
|
||||
|
||||
void CalcSinrValues (Ptr <const SpectrumValue> rxPsd, Ptr <const SpectrumValue> noise);
|
||||
|
||||
private:
|
||||
// inherited from AntennaModel
|
||||
virtual double GetGainDb (Angles a);
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* UE_LTE_SPECTRUM_PHY_H */
|
||||
#endif // ISOTROPIC_ANTENNA_MODEL_H
|
||||
@@ -0,0 +1,117 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2012 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/double.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "antenna-model.h"
|
||||
#include "parabolic-antenna-model.h"
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("ParabolicAntennaModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (ParabolicAntennaModel);
|
||||
|
||||
|
||||
TypeId
|
||||
ParabolicAntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::ParabolicAntennaModel")
|
||||
.SetParent<AntennaModel> ()
|
||||
.AddConstructor<ParabolicAntennaModel> ()
|
||||
.AddAttribute ("Beamwidth",
|
||||
"The 3dB beamwidth (degrees)",
|
||||
DoubleValue (60),
|
||||
MakeDoubleAccessor (&ParabolicAntennaModel::SetBeamwidth,
|
||||
&ParabolicAntennaModel::GetBeamwidth),
|
||||
MakeDoubleChecker<double> (0, 180))
|
||||
.AddAttribute ("Orientation",
|
||||
"The angle (degrees) that expresses the orientation of the antenna on the x-y plane relative to the x axis",
|
||||
DoubleValue (0.0),
|
||||
MakeDoubleAccessor (&ParabolicAntennaModel::SetOrientation,
|
||||
&ParabolicAntennaModel::GetOrientation),
|
||||
MakeDoubleChecker<double> (-360, 360))
|
||||
.AddAttribute ("MaxAttenuation",
|
||||
"The maximum attenuation (dB) of the antenna radiation pattern.",
|
||||
DoubleValue (20.0),
|
||||
MakeDoubleAccessor (&ParabolicAntennaModel::m_maxAttenuation),
|
||||
MakeDoubleChecker<double> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
ParabolicAntennaModel::SetBeamwidth (double beamwidthDegrees)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << beamwidthDegrees);
|
||||
m_beamwidthRadians = DegreesToRadians (beamwidthDegrees);
|
||||
}
|
||||
|
||||
double
|
||||
ParabolicAntennaModel::GetBeamwidth () const
|
||||
{
|
||||
return RadiansToDegrees (m_beamwidthRadians);
|
||||
}
|
||||
|
||||
void
|
||||
ParabolicAntennaModel::SetOrientation (double orientationDegrees)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << orientationDegrees);
|
||||
m_orientationRadians = DegreesToRadians (orientationDegrees);
|
||||
}
|
||||
|
||||
double
|
||||
ParabolicAntennaModel::GetOrientation () const
|
||||
{
|
||||
return RadiansToDegrees (m_orientationRadians);
|
||||
}
|
||||
|
||||
double
|
||||
ParabolicAntennaModel::GetGainDb (Angles a)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << a);
|
||||
// azimuth angle w.r.t. the reference system of the antenna
|
||||
double phi = a.phi - m_orientationRadians;
|
||||
|
||||
// make sure phi is in (-pi, pi]
|
||||
while (phi <= -M_PI)
|
||||
{
|
||||
phi += M_PI+M_PI;
|
||||
}
|
||||
while (phi > M_PI)
|
||||
{
|
||||
phi -= M_PI+M_PI;
|
||||
}
|
||||
|
||||
NS_LOG_LOGIC ("phi = " << phi );
|
||||
|
||||
double gainDb = -std::min (12 * pow (phi / m_beamwidthRadians, 2), m_maxAttenuation);
|
||||
|
||||
NS_LOG_LOGIC ("gain = " << gainDb);
|
||||
return gainDb;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2012 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef PARABOLIC_ANTENNA_MODEL_H
|
||||
#define PARABOLIC_ANTENNA_MODEL_H
|
||||
|
||||
|
||||
#include <ns3/object.h>
|
||||
#include <ns3/antenna-model.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
*
|
||||
* \brief Antenna model based on a parabolic approximation of the main lobe radiation pattern.
|
||||
*
|
||||
* This class implements the parabolic model as described in some 3GPP document, e.g., R4-092042
|
||||
*
|
||||
* A similar model appears in
|
||||
*
|
||||
* George Calcev and Matt Dillon, "Antenna Tilt Control in CDMA Networks"
|
||||
* in Proc. of the 2nd Annual International Wireless Internet Conference (WICON), 2006
|
||||
*
|
||||
* though the latter addresses also the elevation plane, which the present model doesn't.
|
||||
*
|
||||
*
|
||||
*/
|
||||
class ParabolicAntennaModel : public AntennaModel
|
||||
{
|
||||
public:
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId ();
|
||||
|
||||
// inherited from AntennaModel
|
||||
virtual double GetGainDb (Angles a);
|
||||
|
||||
|
||||
// attribute getters/setters
|
||||
void SetBeamwidth (double beamwidthDegrees);
|
||||
double GetBeamwidth () const;
|
||||
void SetOrientation (double orientationDegrees);
|
||||
double GetOrientation () const;
|
||||
|
||||
private:
|
||||
|
||||
double m_beamwidthRadians;
|
||||
|
||||
double m_orientationRadians;
|
||||
|
||||
double m_maxAttenuation;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
#endif // PARABOLIC_ANTENNA_MODEL_H
|
||||
@@ -0,0 +1,216 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/test.h>
|
||||
#include <ns3/antenna-model.h>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class OneVectorConstructorTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (Vector v);
|
||||
OneVectorConstructorTestCase (Vector v, Angles a);
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
Vector m_v;
|
||||
Angles m_a;
|
||||
};
|
||||
|
||||
std::string OneVectorConstructorTestCase::BuildNameString (Vector v)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << " v = " << v;
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
OneVectorConstructorTestCase::OneVectorConstructorTestCase (Vector v, Angles a)
|
||||
: TestCase (BuildNameString (v)),
|
||||
m_v (v),
|
||||
m_a (a)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
OneVectorConstructorTestCase::DoRun ()
|
||||
{
|
||||
Angles a (m_v);
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL ( a.phi, m_a.phi, 1e-10, "incorrect phi");
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL ( a.theta, m_a.theta, 1e-10, "incorrect theta");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class TwoVectorsConstructorTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (Vector v, Vector o);
|
||||
TwoVectorsConstructorTestCase (Vector v, Vector o, Angles a);
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
Vector m_v;
|
||||
Vector m_o;
|
||||
Angles m_a;
|
||||
};
|
||||
|
||||
std::string TwoVectorsConstructorTestCase::BuildNameString (Vector v, Vector o)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << " v = " << v << ", o = " << o;
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
TwoVectorsConstructorTestCase::TwoVectorsConstructorTestCase (Vector v, Vector o, Angles a)
|
||||
: TestCase (BuildNameString (v, o)),
|
||||
m_v (v),
|
||||
m_o (o),
|
||||
m_a (a)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TwoVectorsConstructorTestCase::DoRun ()
|
||||
{
|
||||
Angles a (m_v, m_o);
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL ( a.phi, m_a.phi, 1e-10, "incorrect phi");
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL ( a.theta, m_a.theta, 1e-10, "incorrect theta");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class AnglesTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
AnglesTestSuite ();
|
||||
};
|
||||
|
||||
AnglesTestSuite::AnglesTestSuite ()
|
||||
: TestSuite ("angles", UNIT)
|
||||
{
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 0), Angles (0, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 0), Angles (M_PI, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 0), Angles (M_PI_2, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 0), Angles (-M_PI_2, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 1), Angles (0, 0)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -1), Angles (0, M_PI)));
|
||||
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (2, 0, 0), Angles (0, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-2, 0, 0), Angles (M_PI, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 2, 0), Angles (M_PI_2, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, -2, 0), Angles (-M_PI_2, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 2), Angles (0, 0)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -2), Angles (0, M_PI)));
|
||||
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 1), Angles (0, M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, -1), Angles (0, 3*M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, 0), Angles (M_PI_4, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, 0), Angles (-M_PI_4, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 1), Angles (M_PI, M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, -1), Angles (M_PI, 3*M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, 0), Angles (3*M_PI_4, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, -1, 0), Angles (-3*M_PI_4, M_PI_2)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 1), Angles (M_PI_2, M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, -1), Angles (M_PI_2, 3*M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 1), Angles (-M_PI_2, M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, -1), Angles (-M_PI_2, 3*M_PI_4)));
|
||||
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, sqrt (2)), Angles (M_PI_4, M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, -sqrt (2)), Angles (M_PI_4, 3*M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, sqrt (2)), Angles (-M_PI_4, M_PI_4)));
|
||||
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, sqrt (2)), Angles (3*M_PI_4, M_PI_4)));
|
||||
|
||||
|
||||
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 0), Vector (0, 0, 0), Angles (0, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 0), Vector (0, 0, 0), Angles (M_PI, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 0), Vector (0, 0, 0), Angles (M_PI_2, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 0), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 1), Vector (0, 0, 0), Angles (0, 0)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -1), Vector (0, 0, 0), Angles (0, M_PI)));
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 0, 0), Vector (0, 0, 0), Angles (0, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 0, 0), Vector (0, 0, 0), Angles (M_PI, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 2, 0), Vector (0, 0, 0), Angles (M_PI_2, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, 0), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 2), Vector (0, 0, 0), Angles (0, 0)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -2), Vector (0, 0, 0), Angles (0, M_PI)));
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 1), Vector (0, 0, 0), Angles (0, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, -1), Vector (0, 0, 0), Angles (0, 3*M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, 0), Vector (0, 0, 0), Angles (M_PI_4, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, 0), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 1), Vector (0, 0, 0), Angles (M_PI, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, -1), Vector (0, 0, 0), Angles (M_PI, 3*M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, 0), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, -1, 0), Vector (0, 0, 0), Angles (-3*M_PI_4, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 1), Vector (0, 0, 0), Angles (M_PI_2, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, -1), Vector (0, 0, 0), Angles (M_PI_2, 3*M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 1), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, -1), Vector (0, 0, 0), Angles (-M_PI_2, 3*M_PI_4)));
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, -sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, 3*M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, sqrt (2)), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, sqrt (2)), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_4)));
|
||||
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (3, 2, 2), Vector (2, 2, 2), Angles (0, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 2, 2), Vector (2, 2, 2), Angles (M_PI, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 3, 2), Vector (2, 2, 2), Angles (M_PI_2, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 2, 2), Vector (-1, 3, 2), Angles (-M_PI_2, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (4, -2, 7), Vector (4, -2, 6), Angles (0, 0)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -5, -1), Vector (0, -5, 0), Angles (0, M_PI)));
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 2, -1), Vector (-4, 2, -1), Angles (0, M_PI_2)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 2, 0), Vector (4, 2, 0), Angles (M_PI, M_PI_2)));
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 4, 4), Vector (-2, 4, 3), Angles (0, M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, -6), Vector (-1, -2, -5), Angles (0, 3*M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (77, 3, 43), Vector (78, 2, 43), Angles (3*M_PI_4, M_PI_2)));
|
||||
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (24, -2, -6 -sqrt (2)), Vector (23, -3, -6), Angles (M_PI_4, 3*M_PI_4)));
|
||||
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0.5, 11.45, sqrt (2)-1), Vector (-0.5, 12.45, -1), Angles (-M_PI_4, M_PI_4)));
|
||||
|
||||
|
||||
};
|
||||
|
||||
static AnglesTestSuite staticAnglesTestSuiteInstance;
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,211 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/test.h>
|
||||
#include <ns3/double.h>
|
||||
#include <ns3/cosine-antenna-model.h>
|
||||
#include <ns3/simulator.h>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("TestCosineAntennaModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
enum CosineAntennaModelGainTestCondition {
|
||||
EQUAL = 0,
|
||||
LESSTHAN = 1
|
||||
};
|
||||
|
||||
class CosineAntennaModelTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (Angles a, double b, double o, double g);
|
||||
CosineAntennaModelTestCase (Angles a, double b, double o, double g, double expectedGainDb, CosineAntennaModelGainTestCondition cond);
|
||||
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
Angles m_a;
|
||||
double m_b;
|
||||
double m_o;
|
||||
double m_g;
|
||||
double m_expectedGain;
|
||||
CosineAntennaModelGainTestCondition m_cond;
|
||||
};
|
||||
|
||||
std::string CosineAntennaModelTestCase::BuildNameString (Angles a, double b, double o, double g)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "theta=" << a.theta << " , phi=" << a.phi
|
||||
<< ", beamdwidth=" << b << "deg"
|
||||
<< ", orientation=" << o
|
||||
<< ", maxGain=" << g << " dB";
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
CosineAntennaModelTestCase::CosineAntennaModelTestCase (Angles a, double b, double o, double g, double expectedGainDb, CosineAntennaModelGainTestCondition cond)
|
||||
: TestCase (BuildNameString (a, b, o, g)),
|
||||
m_a (a),
|
||||
m_b (b),
|
||||
m_o (o),
|
||||
m_g (g),
|
||||
m_expectedGain (expectedGainDb),
|
||||
m_cond (cond)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CosineAntennaModelTestCase::DoRun ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this << BuildNameString (m_a, m_b, m_o, m_g));
|
||||
|
||||
Ptr<CosineAntennaModel> a = CreateObject<CosineAntennaModel> ();
|
||||
a->SetAttribute ("Beamwidth", DoubleValue (m_b));
|
||||
a->SetAttribute ("Orientation", DoubleValue (m_o));
|
||||
a->SetAttribute ("MaxGain", DoubleValue (m_g));
|
||||
double actualGain = a->GetGainDb (m_a);
|
||||
switch (m_cond)
|
||||
{
|
||||
case EQUAL:
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL (actualGain, m_expectedGain, 0.001, "wrong value of the radiation pattern");
|
||||
break;
|
||||
case LESSTHAN:
|
||||
NS_TEST_EXPECT_MSG_LT (actualGain, m_expectedGain, "gain higher than expected");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class CosineAntennaModelTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
CosineAntennaModelTestSuite ();
|
||||
};
|
||||
|
||||
CosineAntennaModelTestSuite::CosineAntennaModelTestSuite ()
|
||||
: TestSuite ("cosine-antenna-model", UNIT)
|
||||
{
|
||||
// to calculate the azimut angle offset for a given gain in db:
|
||||
// phideg = (2*acos(10^(targetgaindb/(20*n))))*180/pi
|
||||
// e.g., with a 60 deg beamwidth, gain is -20dB at +- 74.945 degrees from boresight
|
||||
|
||||
// phi, theta, beamwidth, orientation, maxGain, expectedGain, condition
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (180), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-180), 0), 60, 0, 0, -20, LESSTHAN));
|
||||
|
||||
// test positive orientation
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 60, 60, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 60, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 60, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (160), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (210), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (240), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-40), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-120), 0), 60, 60, 0, -20, LESSTHAN));
|
||||
|
||||
// test negative orientation and different beamwidths
|
||||
// with a 100 deg beamwidth, gain is -20dB at +- 117.47 degrees from boresight
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 100, -150, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 100, -150, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 0), 100, -150, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-32.531), 0), 100, -150, 0, -20, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (92.531), 0), 100, -150, 0, -20, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 100, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 100, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 100, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 100, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 100, -150, 0, -20, LESSTHAN));
|
||||
// with a 150 deg beamwidth, gain is -10dB at +- 124.93 degrees from boresight, and -20dB at +- 155.32 degrees from boresight
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 150, -150, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (135), 0), 150, -150, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-75), 0), 150, -150, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (85.070), 0), 150, -150, 0, -10, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-25.070), 0), 150, -150, 0, -10, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (5.3230), 0), 150, -150, 0, -20, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (54.677), 0), 150, -150, 0, -20, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 150, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (20), 0), 150, -150, 0, -20, LESSTHAN));
|
||||
|
||||
// test maxGain
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 10, 10, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 22, 19, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, -4, -7, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 10, -10, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, -20, -40, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 40, 20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 100, -150, 2, 2, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 100, -150, 4, 1, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 0), 100, -150, -1, -4, EQUAL));
|
||||
|
||||
|
||||
// test elevation angle
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 2), 60, 0, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 2), 60, 0, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 2), 60, 0, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-90), 2), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-180), 2), 60, 0, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (60), -3), 60, 60, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), -3), 60, 60, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), -3), 60, 60, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-120), -3), 60, 60, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), -3), 100, -150, 0, 0, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), -3), 100, -150, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), -3), 100, -150, 0, -3, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), -3), 100, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (90), 9.5), 100, -150, 0, -20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (0), 9.5), 60, 0, 10, 10, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (30), 9.5), 60, 0, 22, 19, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-30), 9.5), 60, 0, -4, -7, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (100), 9.5), 60, 0, 40, 20, LESSTHAN));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150), 9.5), 100, -150, 2, 2, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100), 9.5), 100, -150, 4, 1, EQUAL));
|
||||
AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200), 9.5), 100, -150, -1, -4, EQUAL));
|
||||
|
||||
};
|
||||
|
||||
static CosineAntennaModelTestSuite staticCosineAntennaModelTestSuiteInstance;
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,139 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/test.h>
|
||||
#include <ns3/antenna-model.h>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class DegreesToRadiansTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (double a);
|
||||
DegreesToRadiansTestCase (double a, double b);
|
||||
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
double m_a;
|
||||
double m_b;
|
||||
};
|
||||
|
||||
std::string DegreesToRadiansTestCase::BuildNameString (double a)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "angle = " << a << " degrees";
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
DegreesToRadiansTestCase::DegreesToRadiansTestCase (double a, double b)
|
||||
: TestCase (BuildNameString (a)),
|
||||
m_a (a),
|
||||
m_b (b)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
DegreesToRadiansTestCase::DoRun ()
|
||||
{
|
||||
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL (DegreesToRadians (m_a), m_b, 1e-10, "wrong conversion");
|
||||
}
|
||||
|
||||
|
||||
|
||||
class RadiansToDegreesTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (double a);
|
||||
RadiansToDegreesTestCase (double a, double b);
|
||||
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
double m_a;
|
||||
double m_b;
|
||||
};
|
||||
|
||||
std::string RadiansToDegreesTestCase::BuildNameString (double a)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "angle = " << a << " degrees";
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
RadiansToDegreesTestCase::RadiansToDegreesTestCase (double a, double b)
|
||||
: TestCase (BuildNameString (a)),
|
||||
m_a (a),
|
||||
m_b (b)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
RadiansToDegreesTestCase::DoRun ()
|
||||
{
|
||||
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL (RadiansToDegrees (m_a), m_b, 1e-10, "wrong conversion");
|
||||
}
|
||||
|
||||
|
||||
|
||||
class DegreesRadiansTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
DegreesRadiansTestSuite ();
|
||||
};
|
||||
|
||||
DegreesRadiansTestSuite::DegreesRadiansTestSuite ()
|
||||
: TestSuite ("degrees-radians", UNIT)
|
||||
{
|
||||
AddTestCase (new DegreesToRadiansTestCase (0, 0));
|
||||
AddTestCase (new DegreesToRadiansTestCase (90, M_PI_2));
|
||||
AddTestCase (new DegreesToRadiansTestCase (180, M_PI));
|
||||
AddTestCase (new DegreesToRadiansTestCase (270, M_PI + M_PI_2));
|
||||
AddTestCase (new DegreesToRadiansTestCase (360, M_PI + M_PI));
|
||||
AddTestCase (new DegreesToRadiansTestCase (-90, -M_PI_2));
|
||||
AddTestCase (new DegreesToRadiansTestCase (810, 4.5*M_PI));
|
||||
|
||||
AddTestCase (new RadiansToDegreesTestCase (0, 0));
|
||||
AddTestCase (new RadiansToDegreesTestCase (M_PI_2, 90));
|
||||
AddTestCase (new RadiansToDegreesTestCase (M_PI, 180));
|
||||
AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI_2, 270));
|
||||
AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI, 360));
|
||||
AddTestCase (new RadiansToDegreesTestCase (-M_PI_2, -90));
|
||||
AddTestCase (new RadiansToDegreesTestCase (4.5*M_PI, 810));
|
||||
|
||||
};
|
||||
|
||||
static DegreesRadiansTestSuite staticDegreesRadiansTestSuiteInstance;
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,97 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/test.h>
|
||||
#include <ns3/isotropic-antenna-model.h>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class IsotropicAntennaModelTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (Angles a);
|
||||
IsotropicAntennaModelTestCase (Angles a, double expectedGainDb);
|
||||
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
Angles m_a;
|
||||
double m_expectedGain;
|
||||
};
|
||||
|
||||
std::string IsotropicAntennaModelTestCase::BuildNameString (Angles a)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "theta=" << a.theta << " , phi=" << a.phi;
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
IsotropicAntennaModelTestCase::IsotropicAntennaModelTestCase (Angles a, double expectedGainDb)
|
||||
: TestCase (BuildNameString (a)),
|
||||
m_a (a),
|
||||
m_expectedGain (expectedGainDb)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
IsotropicAntennaModelTestCase::DoRun ()
|
||||
{
|
||||
Ptr<IsotropicAntennaModel> a = Create<IsotropicAntennaModel> ();
|
||||
double actualGain = a->GetGainDb (m_a);
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL (actualGain, m_expectedGain, 0.01, "wrong value of the radiation pattern");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class IsotropicAntennaModelTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
IsotropicAntennaModelTestSuite ();
|
||||
};
|
||||
|
||||
IsotropicAntennaModelTestSuite::IsotropicAntennaModelTestSuite ()
|
||||
: TestSuite ("isotropic-antenna-model", UNIT)
|
||||
{
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, 0), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, M_PI), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (0, M_PI_2), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, 0), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, M_PI), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI, M_PI_2), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, 0), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, M_PI), 0.0));
|
||||
AddTestCase (new IsotropicAntennaModelTestCase (Angles (M_PI_2, M_PI_2), 0.0));
|
||||
|
||||
};
|
||||
|
||||
static IsotropicAntennaModelTestSuite staticIsotropicAntennaModelTestSuiteInstance;
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,190 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011,12 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/test.h>
|
||||
#include <ns3/double.h>
|
||||
#include <ns3/parabolic-antenna-model.h>
|
||||
#include <ns3/simulator.h>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("TestParabolicAntennaModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
enum ParabolicAntennaModelGainTestCondition {
|
||||
EQUAL = 0,
|
||||
LESSTHAN = 1
|
||||
};
|
||||
|
||||
class ParabolicAntennaModelTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
static std::string BuildNameString (Angles a, double b, double o, double g);
|
||||
ParabolicAntennaModelTestCase (Angles a, double b, double o, double g, double expectedGainDb, ParabolicAntennaModelGainTestCondition cond);
|
||||
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
Angles m_a;
|
||||
double m_b;
|
||||
double m_o;
|
||||
double m_g;
|
||||
double m_expectedGain;
|
||||
ParabolicAntennaModelGainTestCondition m_cond;
|
||||
};
|
||||
|
||||
std::string ParabolicAntennaModelTestCase::BuildNameString (Angles a, double b, double o, double g)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "theta=" << a.theta << " , phi=" << a.phi
|
||||
<< ", beamdwidth=" << b << "deg"
|
||||
<< ", orientation=" << o
|
||||
<< ", maxAttenuation=" << g << " dB";
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
|
||||
ParabolicAntennaModelTestCase::ParabolicAntennaModelTestCase (Angles a, double b, double o, double g, double expectedGainDb, ParabolicAntennaModelGainTestCondition cond)
|
||||
: TestCase (BuildNameString (a, b, o, g)),
|
||||
m_a (a),
|
||||
m_b (b),
|
||||
m_o (o),
|
||||
m_g (g),
|
||||
m_expectedGain (expectedGainDb),
|
||||
m_cond (cond)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ParabolicAntennaModelTestCase::DoRun ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this << BuildNameString (m_a, m_b, m_o, m_g));
|
||||
|
||||
Ptr<ParabolicAntennaModel> a = CreateObject<ParabolicAntennaModel> ();
|
||||
a->SetAttribute ("Beamwidth", DoubleValue (m_b));
|
||||
a->SetAttribute ("Orientation", DoubleValue (m_o));
|
||||
a->SetAttribute ("MaxAttenuation", DoubleValue (m_g));
|
||||
double actualGain = a->GetGainDb (m_a);
|
||||
switch (m_cond)
|
||||
{
|
||||
case EQUAL:
|
||||
NS_TEST_EXPECT_MSG_EQ_TOL (actualGain, m_expectedGain, 0.001, "wrong value of the radiation pattern");
|
||||
break;
|
||||
case LESSTHAN:
|
||||
NS_TEST_EXPECT_MSG_LT (actualGain, m_expectedGain, "gain higher than expected");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class ParabolicAntennaModelTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
ParabolicAntennaModelTestSuite ();
|
||||
};
|
||||
|
||||
ParabolicAntennaModelTestSuite::ParabolicAntennaModelTestSuite ()
|
||||
: TestSuite ("parabolic-antenna-model", UNIT)
|
||||
{
|
||||
|
||||
// with a 60 deg beamwidth, gain is -20dB at +-77.460 degrees from boresight
|
||||
// phi, theta, beamwidth, orientation, maxAttn, expectedGain, condition
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 60, 0, 20, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 0, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 0, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (100), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (180), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-180), 0), 60, 0, 20, -20, EQUAL));
|
||||
|
||||
// with a 60 deg beamwidth, gain is -10dB at +-54.772 degrees from boresight
|
||||
// test positive orientation
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 60, 60, 10, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 60, 60, 10, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 60, 60, 10, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (150), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (160), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (210), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (240), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-40), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 0), 60, 60, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-120), 0), 60, 60, 10, -10, EQUAL));
|
||||
|
||||
// test negative orientation and different beamwidths
|
||||
// with a 80 deg beamwidth, gain is -20dB at +- 73.030 degrees from boresight
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 0), 80, -150, 10, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-110), 0), 80, -150, 10, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-190), 0), 80, -150, 10, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-70), 0), 80, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (92), 0), 80, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 0), 80, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 0), 80, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), 0), 80, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 0), 80, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 0), 80, -150, 10, -10, EQUAL));
|
||||
|
||||
|
||||
|
||||
// test elevation angle
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 2), 60, 0, 20, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 2), 60, 0, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 2), 60, 0, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-90), 2), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-180), 2), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (60), -3), 60, 60, 20, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), -3), 60, 60, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), -3), 60, 60, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-120), -3), 60, 60, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), -3), 100, -150, 10, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), -3), 100, -150, 10, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200), -3), 100, -150, 10, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), -3), 100, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (90), 9.5), 100, -150, 10, -10, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (0), 9.5), 60, 0, 20, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (30), 9.5), 60, 0, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-30), 9.5), 60, 0, 20, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (100), 9.5), 60, 0, 20, -20, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150), 9.5), 100, -150, 30, 0, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100), 9.5), 100, -150, 30, -3, EQUAL));
|
||||
AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200), 9.5), 100, -150, 30, -3, EQUAL));
|
||||
|
||||
};
|
||||
|
||||
static ParabolicAntennaModelTestSuite staticParabolicAntennaModelTestSuiteInstance;
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,34 @@
|
||||
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
def build(bld):
|
||||
|
||||
module = bld.create_ns3_module('antenna', ['core'])
|
||||
|
||||
module.source = [
|
||||
'model/angles.cc',
|
||||
'model/antenna-model.cc',
|
||||
'model/isotropic-antenna-model.cc',
|
||||
'model/cosine-antenna-model.cc',
|
||||
'model/parabolic-antenna-model.cc',
|
||||
]
|
||||
|
||||
module_test = bld.create_ns3_module_test_library('antenna')
|
||||
module_test.source = [
|
||||
'test/test-angles.cc',
|
||||
'test/test-degrees-radians.cc',
|
||||
'test/test-isotropic-antenna.cc',
|
||||
'test/test-cosine-antenna.cc',
|
||||
'test/test-parabolic-antenna.cc',
|
||||
]
|
||||
|
||||
headers = bld.new_task_gen(features=['ns3header'])
|
||||
headers.module = 'antenna'
|
||||
headers.source = [
|
||||
'model/angles.h',
|
||||
'model/antenna-model.h',
|
||||
'model/isotropic-antenna-model.h',
|
||||
'model/cosine-antenna-model.h',
|
||||
'model/parabolic-antenna-model.h',
|
||||
]
|
||||
|
||||
bld.ns3_python_bindings()
|
||||
@@ -1,12 +1,12 @@
|
||||
callback_classes = [
|
||||
['void', 'ns3::Ptr<ns3::Packet const>', 'ns3::Ipv4Header const&', 'ns3::Socket::SocketErrno', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::Ipv4Route>', 'ns3::Ptr<ns3::Packet const>', 'ns3::Ipv4Header const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::ArpCache const>', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['bool', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::ArpCache const>', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
]
|
||||
|
||||
@@ -120,12 +120,20 @@ def register_types(module):
|
||||
module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network')
|
||||
## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class]
|
||||
module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata'])
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> > [class]
|
||||
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Chunk', 'ns3::ObjectBase', 'ns3::DefaultDeleter<ns3::Chunk>'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator [class]
|
||||
module.add_class('PacketTagIterator', import_from_module='ns.network')
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::Item [class]
|
||||
module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator'])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList [class]
|
||||
module.add_class('PacketTagList', import_from_module='ns.network')
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct]
|
||||
module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList'])
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
|
||||
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
|
||||
## simulator.h (module 'core'): ns3::Simulator [class]
|
||||
module.add_class('Simulator', destructor_visibility='private', import_from_module='ns.core')
|
||||
## tag.h (module 'network'): ns3::Tag [class]
|
||||
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
|
||||
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
|
||||
module.add_class('TagBuffer', import_from_module='ns.network')
|
||||
## timer.h (module 'core'): ns3::Timer [class]
|
||||
@@ -151,7 +159,7 @@ def register_types(module):
|
||||
## aodv-helper.h (module 'aodv'): ns3::AodvHelper [class]
|
||||
module.add_class('AodvHelper', parent=root_module['ns3::Ipv4RoutingHelper'])
|
||||
## chunk.h (module 'network'): ns3::Chunk [class]
|
||||
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >'])
|
||||
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
|
||||
## header.h (module 'network'): ns3::Header [class]
|
||||
module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
|
||||
## ipv4-header.h (module 'internet'): ns3::Ipv4Header [class]
|
||||
@@ -196,8 +204,12 @@ def register_types(module):
|
||||
module.add_enum('SocketErrno', ['ERROR_NOTERROR', 'ERROR_ISCONN', 'ERROR_NOTCONN', 'ERROR_MSGSIZE', 'ERROR_AGAIN', 'ERROR_SHUTDOWN', 'ERROR_OPNOTSUPP', 'ERROR_AFNOSUPPORT', 'ERROR_INVAL', 'ERROR_BADF', 'ERROR_NOROUTETOHOST', 'ERROR_NODEV', 'ERROR_ADDRNOTAVAIL', 'ERROR_ADDRINUSE', 'SOCKET_ERRNO_LAST'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network')
|
||||
## socket.h (module 'network'): ns3::Socket::SocketType [enumeration]
|
||||
module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network')
|
||||
## tag.h (module 'network'): ns3::Tag [class]
|
||||
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::Object'])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag [class]
|
||||
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
|
||||
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
|
||||
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## nstime.h (module 'core'): ns3::Time [class]
|
||||
module.add_class('Time', import_from_module='ns.core')
|
||||
## nstime.h (module 'core'): ns3::Time::Unit [enumeration]
|
||||
@@ -294,12 +306,6 @@ def register_types(module):
|
||||
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
|
||||
## packet.h (module 'network'): ns3::Packet [class]
|
||||
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag [class]
|
||||
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
|
||||
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
|
||||
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## nstime.h (module 'core'): ns3::TimeChecker [class]
|
||||
module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
|
||||
## nstime.h (module 'core'): ns3::TimeValue [class]
|
||||
@@ -312,8 +318,6 @@ def register_types(module):
|
||||
module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker'])
|
||||
## address.h (module 'network'): ns3::AddressValue [class]
|
||||
module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue'])
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting [class]
|
||||
module.add_class('Ipv4ListRouting', import_from_module='ns.internet', parent=root_module['ns3::Ipv4RoutingProtocol'])
|
||||
module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list')
|
||||
module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type='map')
|
||||
|
||||
@@ -406,9 +410,13 @@ def register_methods(root_module):
|
||||
register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata'])
|
||||
register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item'])
|
||||
register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator'])
|
||||
register_Ns3SimpleRefCount__Ns3Chunk_Ns3ObjectBase_Ns3DefaultDeleter__lt__ns3Chunk__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >'])
|
||||
register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator'])
|
||||
register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item'])
|
||||
register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList'])
|
||||
register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData'])
|
||||
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
|
||||
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
|
||||
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
|
||||
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
|
||||
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
|
||||
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
|
||||
@@ -436,7 +444,9 @@ def register_methods(root_module):
|
||||
register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
|
||||
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
|
||||
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
|
||||
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
|
||||
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
|
||||
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
|
||||
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
|
||||
register_Ns3Time_methods(root_module, root_module['ns3::Time'])
|
||||
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
|
||||
register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
|
||||
@@ -478,16 +488,12 @@ def register_methods(root_module):
|
||||
register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue'])
|
||||
register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper'])
|
||||
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
|
||||
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
|
||||
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
|
||||
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
|
||||
register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker'])
|
||||
register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
|
||||
register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
|
||||
register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue'])
|
||||
register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker'])
|
||||
register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
|
||||
register_Ns3Ipv4ListRouting_methods(root_module, root_module['ns3::Ipv4ListRouting'])
|
||||
register_Ns3AodvDuplicatePacketDetection_methods(root_module, root_module['ns3::aodv::DuplicatePacketDetection'])
|
||||
register_Ns3AodvIdCache_methods(root_module, root_module['ns3::aodv::IdCache'])
|
||||
register_Ns3AodvNeighbors_methods(root_module, root_module['ns3::aodv::Neighbors'])
|
||||
@@ -505,8 +511,8 @@ def register_methods(root_module):
|
||||
return
|
||||
|
||||
def register_Ns3Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## address.h (module 'network'): ns3::Address::Address() [constructor]
|
||||
@@ -749,10 +755,6 @@ def register_Ns3BufferIterator_methods(root_module, cls):
|
||||
cls.add_method('Next',
|
||||
'void',
|
||||
[param('uint32_t', 'delta')])
|
||||
## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::PeekU8() [member function]
|
||||
cls.add_method('PeekU8',
|
||||
'uint8_t',
|
||||
[])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function]
|
||||
cls.add_method('Prev',
|
||||
'void',
|
||||
@@ -765,10 +767,6 @@ def register_Ns3BufferIterator_methods(root_module, cls):
|
||||
cls.add_method('Read',
|
||||
'void',
|
||||
[param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(ns3::Buffer::Iterator start, uint32_t size) [member function]
|
||||
cls.add_method('Read',
|
||||
'void',
|
||||
[param('ns3::Buffer::Iterator', 'start'), param('uint32_t', 'size')])
|
||||
## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function]
|
||||
cls.add_method('ReadLsbtohU16',
|
||||
'uint16_t',
|
||||
@@ -1085,8 +1083,8 @@ def register_Ns3IntToType__6_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Ipv4Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(ns3::Ipv4Address const & arg0) [copy constructor]
|
||||
@@ -1112,9 +1110,9 @@ def register_Ns3Ipv4Address_methods(root_module, cls):
|
||||
'ns3::Ipv4Address',
|
||||
[param('uint8_t const *', 'buf')],
|
||||
is_static=True)
|
||||
## ipv4-address.h (module 'network'): uint32_t const & ns3::Ipv4Address::Get() const [member function]
|
||||
## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Address::Get() const [member function]
|
||||
cls.add_method('Get',
|
||||
'uint32_t const &',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetAny() [member function]
|
||||
@@ -1354,8 +1352,8 @@ def register_Ns3Ipv4RoutingHelper_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Ipv6Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address() [constructor]
|
||||
@@ -1640,8 +1638,8 @@ def register_Ns3Ipv6Prefix_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Mac48Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address(ns3::Mac48Address const & arg0) [copy constructor]
|
||||
@@ -1773,21 +1771,6 @@ def register_Ns3NodeContainer_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## node-container.h (module 'network'): ns3::NodeContainer & ns3::NodeContainer::operator()(ns3::NodeContainer other) [member operator]
|
||||
cls.add_method('operator()',
|
||||
'ns3::NodeContainer &',
|
||||
[param('ns3::NodeContainer', 'other')],
|
||||
custom_name='__call__')
|
||||
## node-container.h (module 'network'): ns3::NodeContainer & ns3::NodeContainer::operator()(ns3::Ptr<ns3::Node> node) [member operator]
|
||||
cls.add_method('operator()',
|
||||
'ns3::NodeContainer &',
|
||||
[param('ns3::Ptr< ns3::Node >', 'node')],
|
||||
custom_name='__call__')
|
||||
## node-container.h (module 'network'): ns3::NodeContainer & ns3::NodeContainer::operator()(std::string nodeName) [member operator]
|
||||
cls.add_method('operator()',
|
||||
'ns3::NodeContainer &',
|
||||
[param('std::string', 'nodeName')],
|
||||
custom_name='__call__')
|
||||
return
|
||||
|
||||
def register_Ns3ObjectBase_methods(root_module, cls):
|
||||
@@ -2012,16 +1995,78 @@ def register_Ns3PacketMetadataItemIterator_methods(root_module, cls):
|
||||
[])
|
||||
return
|
||||
|
||||
def register_Ns3SimpleRefCount__Ns3Chunk_Ns3ObjectBase_Ns3DefaultDeleter__lt__ns3Chunk__gt___methods(root_module, cls):
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >::SimpleRefCount() [constructor]
|
||||
cls.add_constructor([])
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> > const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SimpleRefCount< ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter< ns3::Chunk > > const &', 'o')])
|
||||
## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >::Cleanup() [member function]
|
||||
cls.add_method('Cleanup',
|
||||
'void',
|
||||
def register_Ns3PacketTagIterator_methods(root_module, cls):
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')])
|
||||
## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function]
|
||||
cls.add_method('HasNext',
|
||||
'bool',
|
||||
[],
|
||||
is_static=True)
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function]
|
||||
cls.add_method('Next',
|
||||
'ns3::PacketTagIterator::Item',
|
||||
[])
|
||||
return
|
||||
|
||||
def register_Ns3PacketTagIteratorItem_methods(root_module, cls):
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')])
|
||||
## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function]
|
||||
cls.add_method('GetTag',
|
||||
'void',
|
||||
[param('ns3::Tag &', 'tag')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True)
|
||||
return
|
||||
|
||||
def register_Ns3PacketTagList_methods(root_module, cls):
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor]
|
||||
cls.add_constructor([])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagList const &', 'o')])
|
||||
## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function]
|
||||
cls.add_method('Add',
|
||||
'void',
|
||||
[param('ns3::Tag const &', 'tag')],
|
||||
is_const=True)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function]
|
||||
cls.add_method('Head',
|
||||
'ns3::PacketTagList::TagData const *',
|
||||
[],
|
||||
is_const=True)
|
||||
## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function]
|
||||
cls.add_method('Peek',
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')],
|
||||
is_const=True)
|
||||
## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function]
|
||||
cls.add_method('Remove',
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')])
|
||||
## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function]
|
||||
cls.add_method('RemoveAll',
|
||||
'void',
|
||||
[])
|
||||
return
|
||||
|
||||
def register_Ns3PacketTagListTagData_methods(root_module, cls):
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor]
|
||||
cls.add_constructor([])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable]
|
||||
cls.add_instance_attribute('count', 'uint32_t', is_const=False)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable]
|
||||
cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable]
|
||||
cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable]
|
||||
cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
|
||||
return
|
||||
|
||||
def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls):
|
||||
@@ -2116,6 +2161,38 @@ def register_Ns3Simulator_methods(root_module, cls):
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
def register_Ns3Tag_methods(root_module, cls):
|
||||
## tag.h (module 'network'): ns3::Tag::Tag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Tag const &', 'arg0')])
|
||||
## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_virtual=True)
|
||||
## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3TagBuffer_methods(root_module, cls):
|
||||
## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')])
|
||||
@@ -2264,8 +2341,8 @@ def register_Ns3TimerImpl_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3TypeId_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor]
|
||||
@@ -2445,6 +2522,8 @@ def register_Ns3Empty_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Int64x64_t_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
|
||||
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
|
||||
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
|
||||
@@ -2496,9 +2575,7 @@ def register_Ns3Int64x64_t_methods(root_module, cls):
|
||||
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('>')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_output_stream_operator()
|
||||
@@ -3176,6 +3253,11 @@ def register_Ns3Socket_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::Socket::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function]
|
||||
cls.add_method('IsRecvPktInfo',
|
||||
'bool',
|
||||
@@ -3329,46 +3411,155 @@ def register_Ns3Socket_methods(root_module, cls):
|
||||
visibility='protected')
|
||||
return
|
||||
|
||||
def register_Ns3Tag_methods(root_module, cls):
|
||||
cls.add_output_stream_operator()
|
||||
## tag.h (module 'network'): ns3::Tag::Tag() [constructor]
|
||||
def register_Ns3SocketAddressTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag(ns3::SocketAddressTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketAddressTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Tag const &', 'arg0')])
|
||||
## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_virtual=True)
|
||||
## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function]
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::Address ns3::SocketAddressTag::GetAddress() const [member function]
|
||||
cls.add_method('GetAddress',
|
||||
'ns3::Address',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketAddressTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketAddressTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function]
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function]
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function]
|
||||
cls.add_method('SetAddress',
|
||||
'void',
|
||||
[param('ns3::Address', 'addr')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTtlTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketIpTtlTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function]
|
||||
cls.add_method('GetTtl',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function]
|
||||
cls.add_method('SetTtl',
|
||||
'void',
|
||||
[param('uint8_t', 'ttl')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Disable() [member function]
|
||||
cls.add_method('Disable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Enable() [member function]
|
||||
cls.add_method('Enable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketSetDontFragmentTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function]
|
||||
cls.add_method('IsEnabled',
|
||||
'bool',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3Time_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
|
||||
cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
|
||||
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('>')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('<=')
|
||||
@@ -5740,10 +5931,11 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
cls.add_method('AddHeader',
|
||||
'void',
|
||||
[param('ns3::Header const &', 'header')])
|
||||
## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Ptr<const ns3::Tag> tag) [member function]
|
||||
## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function]
|
||||
cls.add_method('AddPacketTag',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Tag const >', 'tag')])
|
||||
[param('ns3::Tag const &', 'tag')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function]
|
||||
cls.add_method('AddPaddingAtEnd',
|
||||
'void',
|
||||
@@ -5802,6 +5994,11 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
'ns3::Ptr< ns3::NixVector >',
|
||||
[],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function]
|
||||
cls.add_method('GetPacketTagIterator',
|
||||
'ns3::PacketTagIterator',
|
||||
[],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
@@ -5827,10 +6024,10 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[param('ns3::Header &', 'header')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::Ptr<const ns3::Tag> ns3::Packet::PeekPacketTag(ns3::TypeId tagType) const [member function]
|
||||
## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function]
|
||||
cls.add_method('PeekPacketTag',
|
||||
'ns3::Ptr< ns3::Tag const >',
|
||||
[param('ns3::TypeId', 'tagType')],
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function]
|
||||
cls.add_method('PeekTrailer',
|
||||
@@ -5871,10 +6068,10 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
cls.add_method('RemoveHeader',
|
||||
'uint32_t',
|
||||
[param('ns3::Header &', 'header')])
|
||||
## packet.h (module 'network'): ns3::Ptr<const ns3::Tag> ns3::Packet::RemovePacketTag(ns3::TypeId tagType) [member function]
|
||||
## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function]
|
||||
cls.add_method('RemovePacketTag',
|
||||
'ns3::Ptr< ns3::Tag const >',
|
||||
[param('ns3::TypeId', 'tagType')])
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')])
|
||||
## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function]
|
||||
cls.add_method('RemoveTrailer',
|
||||
'uint32_t',
|
||||
@@ -5890,148 +6087,6 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketAddressTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag(ns3::SocketAddressTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketAddressTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::Address ns3::SocketAddressTag::GetAddress() const [member function]
|
||||
cls.add_method('GetAddress',
|
||||
'ns3::Address',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketAddressTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketAddressTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function]
|
||||
cls.add_method('SetAddress',
|
||||
'void',
|
||||
[param('ns3::Address', 'addr')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTtlTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketIpTtlTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function]
|
||||
cls.add_method('GetTtl',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function]
|
||||
cls.add_method('SetTtl',
|
||||
'void',
|
||||
[param('uint8_t', 'ttl')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Disable() [member function]
|
||||
cls.add_method('Disable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Enable() [member function]
|
||||
cls.add_method('Enable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketSetDontFragmentTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function]
|
||||
cls.add_method('IsEnabled',
|
||||
'bool',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3TimeChecker_methods(root_module, cls):
|
||||
## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor]
|
||||
cls.add_constructor([])
|
||||
@@ -6152,83 +6207,6 @@ def register_Ns3AddressValue_methods(root_module, cls):
|
||||
[param('ns3::Address const &', 'value')])
|
||||
return
|
||||
|
||||
def register_Ns3Ipv4ListRouting_methods(root_module, cls):
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting(ns3::Ipv4ListRouting const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Ipv4ListRouting const &', 'arg0')])
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting() [constructor]
|
||||
cls.add_constructor([])
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::AddRoutingProtocol(ns3::Ptr<ns3::Ipv4RoutingProtocol> routingProtocol, int16_t priority) [member function]
|
||||
cls.add_method('AddRoutingProtocol',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): uint32_t ns3::Ipv4ListRouting::GetNRoutingProtocols() const [member function]
|
||||
cls.add_method('GetNRoutingProtocols',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv4RoutingProtocol> ns3::Ipv4ListRouting::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function]
|
||||
cls.add_method('GetRoutingProtocol',
|
||||
'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
|
||||
[param('uint32_t', 'index'), param('int16_t &', 'priority', direction=2)],
|
||||
is_const=True, is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
|
||||
cls.add_method('NotifyAddAddress',
|
||||
'void',
|
||||
[param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceDown(uint32_t interface) [member function]
|
||||
cls.add_method('NotifyInterfaceDown',
|
||||
'void',
|
||||
[param('uint32_t', 'interface')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceUp(uint32_t interface) [member function]
|
||||
cls.add_method('NotifyInterfaceUp',
|
||||
'void',
|
||||
[param('uint32_t', 'interface')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
|
||||
cls.add_method('NotifyRemoveAddress',
|
||||
'void',
|
||||
[param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::PrintRoutingTable(ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
|
||||
cls.add_method('PrintRoutingTable',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
|
||||
is_const=True, is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): bool ns3::Ipv4ListRouting::RouteInput(ns3::Ptr<ns3::Packet const> p, ns3::Ipv4Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void, ns3::Ptr<ns3::Ipv4Route>, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv4MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function]
|
||||
cls.add_method('RouteInput',
|
||||
'bool',
|
||||
[param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv4Route> ns3::Ipv4ListRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv4Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
|
||||
cls.add_method('RouteOutput',
|
||||
'ns3::Ptr< ns3::Ipv4Route >',
|
||||
[param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice >', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::SetIpv4(ns3::Ptr<ns3::Ipv4> ipv4) [member function]
|
||||
cls.add_method('SetIpv4',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoDispose() [member function]
|
||||
cls.add_method('DoDispose',
|
||||
'void',
|
||||
[],
|
||||
visibility='protected', is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoStart() [member function]
|
||||
cls.add_method('DoStart',
|
||||
'void',
|
||||
[],
|
||||
visibility='protected', is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3AodvDuplicatePacketDetection_methods(root_module, cls):
|
||||
## aodv-dpd.h (module 'aodv'): ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection(ns3::aodv::DuplicatePacketDetection const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::aodv::DuplicatePacketDetection const &', 'arg0')])
|
||||
|
||||
@@ -120,12 +120,20 @@ def register_types(module):
|
||||
module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network')
|
||||
## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class]
|
||||
module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata'])
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> > [class]
|
||||
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Chunk', 'ns3::ObjectBase', 'ns3::DefaultDeleter<ns3::Chunk>'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator [class]
|
||||
module.add_class('PacketTagIterator', import_from_module='ns.network')
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::Item [class]
|
||||
module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator'])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList [class]
|
||||
module.add_class('PacketTagList', import_from_module='ns.network')
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct]
|
||||
module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList'])
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
|
||||
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
|
||||
## simulator.h (module 'core'): ns3::Simulator [class]
|
||||
module.add_class('Simulator', destructor_visibility='private', import_from_module='ns.core')
|
||||
## tag.h (module 'network'): ns3::Tag [class]
|
||||
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
|
||||
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
|
||||
module.add_class('TagBuffer', import_from_module='ns.network')
|
||||
## timer.h (module 'core'): ns3::Timer [class]
|
||||
@@ -151,7 +159,7 @@ def register_types(module):
|
||||
## aodv-helper.h (module 'aodv'): ns3::AodvHelper [class]
|
||||
module.add_class('AodvHelper', parent=root_module['ns3::Ipv4RoutingHelper'])
|
||||
## chunk.h (module 'network'): ns3::Chunk [class]
|
||||
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >'])
|
||||
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
|
||||
## header.h (module 'network'): ns3::Header [class]
|
||||
module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
|
||||
## ipv4-header.h (module 'internet'): ns3::Ipv4Header [class]
|
||||
@@ -196,8 +204,12 @@ def register_types(module):
|
||||
module.add_enum('SocketErrno', ['ERROR_NOTERROR', 'ERROR_ISCONN', 'ERROR_NOTCONN', 'ERROR_MSGSIZE', 'ERROR_AGAIN', 'ERROR_SHUTDOWN', 'ERROR_OPNOTSUPP', 'ERROR_AFNOSUPPORT', 'ERROR_INVAL', 'ERROR_BADF', 'ERROR_NOROUTETOHOST', 'ERROR_NODEV', 'ERROR_ADDRNOTAVAIL', 'ERROR_ADDRINUSE', 'SOCKET_ERRNO_LAST'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network')
|
||||
## socket.h (module 'network'): ns3::Socket::SocketType [enumeration]
|
||||
module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network')
|
||||
## tag.h (module 'network'): ns3::Tag [class]
|
||||
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::Object'])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag [class]
|
||||
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
|
||||
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
|
||||
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## nstime.h (module 'core'): ns3::Time [class]
|
||||
module.add_class('Time', import_from_module='ns.core')
|
||||
## nstime.h (module 'core'): ns3::Time::Unit [enumeration]
|
||||
@@ -294,12 +306,6 @@ def register_types(module):
|
||||
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
|
||||
## packet.h (module 'network'): ns3::Packet [class]
|
||||
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag [class]
|
||||
module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag [class]
|
||||
module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class]
|
||||
module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag'])
|
||||
## nstime.h (module 'core'): ns3::TimeChecker [class]
|
||||
module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
|
||||
## nstime.h (module 'core'): ns3::TimeValue [class]
|
||||
@@ -312,8 +318,6 @@ def register_types(module):
|
||||
module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker'])
|
||||
## address.h (module 'network'): ns3::AddressValue [class]
|
||||
module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue'])
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting [class]
|
||||
module.add_class('Ipv4ListRouting', import_from_module='ns.internet', parent=root_module['ns3::Ipv4RoutingProtocol'])
|
||||
module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list')
|
||||
module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type='map')
|
||||
|
||||
@@ -406,9 +410,13 @@ def register_methods(root_module):
|
||||
register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata'])
|
||||
register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item'])
|
||||
register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator'])
|
||||
register_Ns3SimpleRefCount__Ns3Chunk_Ns3ObjectBase_Ns3DefaultDeleter__lt__ns3Chunk__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >'])
|
||||
register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator'])
|
||||
register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item'])
|
||||
register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList'])
|
||||
register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData'])
|
||||
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
|
||||
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
|
||||
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
|
||||
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
|
||||
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
|
||||
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
|
||||
@@ -436,7 +444,9 @@ def register_methods(root_module):
|
||||
register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
|
||||
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
|
||||
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
|
||||
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
|
||||
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
|
||||
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
|
||||
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
|
||||
register_Ns3Time_methods(root_module, root_module['ns3::Time'])
|
||||
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
|
||||
register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
|
||||
@@ -478,16 +488,12 @@ def register_methods(root_module):
|
||||
register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue'])
|
||||
register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper'])
|
||||
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
|
||||
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
|
||||
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
|
||||
register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
|
||||
register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker'])
|
||||
register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
|
||||
register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
|
||||
register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue'])
|
||||
register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker'])
|
||||
register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
|
||||
register_Ns3Ipv4ListRouting_methods(root_module, root_module['ns3::Ipv4ListRouting'])
|
||||
register_Ns3AodvDuplicatePacketDetection_methods(root_module, root_module['ns3::aodv::DuplicatePacketDetection'])
|
||||
register_Ns3AodvIdCache_methods(root_module, root_module['ns3::aodv::IdCache'])
|
||||
register_Ns3AodvNeighbors_methods(root_module, root_module['ns3::aodv::Neighbors'])
|
||||
@@ -505,8 +511,8 @@ def register_methods(root_module):
|
||||
return
|
||||
|
||||
def register_Ns3Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## address.h (module 'network'): ns3::Address::Address() [constructor]
|
||||
@@ -749,10 +755,6 @@ def register_Ns3BufferIterator_methods(root_module, cls):
|
||||
cls.add_method('Next',
|
||||
'void',
|
||||
[param('uint32_t', 'delta')])
|
||||
## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::PeekU8() [member function]
|
||||
cls.add_method('PeekU8',
|
||||
'uint8_t',
|
||||
[])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function]
|
||||
cls.add_method('Prev',
|
||||
'void',
|
||||
@@ -765,10 +767,6 @@ def register_Ns3BufferIterator_methods(root_module, cls):
|
||||
cls.add_method('Read',
|
||||
'void',
|
||||
[param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(ns3::Buffer::Iterator start, uint32_t size) [member function]
|
||||
cls.add_method('Read',
|
||||
'void',
|
||||
[param('ns3::Buffer::Iterator', 'start'), param('uint32_t', 'size')])
|
||||
## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function]
|
||||
cls.add_method('ReadLsbtohU16',
|
||||
'uint16_t',
|
||||
@@ -1085,8 +1083,8 @@ def register_Ns3IntToType__6_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Ipv4Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(ns3::Ipv4Address const & arg0) [copy constructor]
|
||||
@@ -1112,9 +1110,9 @@ def register_Ns3Ipv4Address_methods(root_module, cls):
|
||||
'ns3::Ipv4Address',
|
||||
[param('uint8_t const *', 'buf')],
|
||||
is_static=True)
|
||||
## ipv4-address.h (module 'network'): uint32_t const & ns3::Ipv4Address::Get() const [member function]
|
||||
## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Address::Get() const [member function]
|
||||
cls.add_method('Get',
|
||||
'uint32_t const &',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetAny() [member function]
|
||||
@@ -1354,8 +1352,8 @@ def register_Ns3Ipv4RoutingHelper_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Ipv6Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address() [constructor]
|
||||
@@ -1640,8 +1638,8 @@ def register_Ns3Ipv6Prefix_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Mac48Address_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address(ns3::Mac48Address const & arg0) [copy constructor]
|
||||
@@ -1773,21 +1771,6 @@ def register_Ns3NodeContainer_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## node-container.h (module 'network'): ns3::NodeContainer & ns3::NodeContainer::operator()(ns3::NodeContainer other) [member operator]
|
||||
cls.add_method('operator()',
|
||||
'ns3::NodeContainer &',
|
||||
[param('ns3::NodeContainer', 'other')],
|
||||
custom_name='__call__')
|
||||
## node-container.h (module 'network'): ns3::NodeContainer & ns3::NodeContainer::operator()(ns3::Ptr<ns3::Node> node) [member operator]
|
||||
cls.add_method('operator()',
|
||||
'ns3::NodeContainer &',
|
||||
[param('ns3::Ptr< ns3::Node >', 'node')],
|
||||
custom_name='__call__')
|
||||
## node-container.h (module 'network'): ns3::NodeContainer & ns3::NodeContainer::operator()(std::string nodeName) [member operator]
|
||||
cls.add_method('operator()',
|
||||
'ns3::NodeContainer &',
|
||||
[param('std::string', 'nodeName')],
|
||||
custom_name='__call__')
|
||||
return
|
||||
|
||||
def register_Ns3ObjectBase_methods(root_module, cls):
|
||||
@@ -2012,16 +1995,78 @@ def register_Ns3PacketMetadataItemIterator_methods(root_module, cls):
|
||||
[])
|
||||
return
|
||||
|
||||
def register_Ns3SimpleRefCount__Ns3Chunk_Ns3ObjectBase_Ns3DefaultDeleter__lt__ns3Chunk__gt___methods(root_module, cls):
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >::SimpleRefCount() [constructor]
|
||||
cls.add_constructor([])
|
||||
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> > const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SimpleRefCount< ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter< ns3::Chunk > > const &', 'o')])
|
||||
## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Chunk, ns3::ObjectBase, ns3::DefaultDeleter<ns3::Chunk> >::Cleanup() [member function]
|
||||
cls.add_method('Cleanup',
|
||||
'void',
|
||||
def register_Ns3PacketTagIterator_methods(root_module, cls):
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')])
|
||||
## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function]
|
||||
cls.add_method('HasNext',
|
||||
'bool',
|
||||
[],
|
||||
is_static=True)
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function]
|
||||
cls.add_method('Next',
|
||||
'ns3::PacketTagIterator::Item',
|
||||
[])
|
||||
return
|
||||
|
||||
def register_Ns3PacketTagIteratorItem_methods(root_module, cls):
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')])
|
||||
## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function]
|
||||
cls.add_method('GetTag',
|
||||
'void',
|
||||
[param('ns3::Tag &', 'tag')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True)
|
||||
return
|
||||
|
||||
def register_Ns3PacketTagList_methods(root_module, cls):
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor]
|
||||
cls.add_constructor([])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagList const &', 'o')])
|
||||
## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function]
|
||||
cls.add_method('Add',
|
||||
'void',
|
||||
[param('ns3::Tag const &', 'tag')],
|
||||
is_const=True)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function]
|
||||
cls.add_method('Head',
|
||||
'ns3::PacketTagList::TagData const *',
|
||||
[],
|
||||
is_const=True)
|
||||
## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function]
|
||||
cls.add_method('Peek',
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')],
|
||||
is_const=True)
|
||||
## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function]
|
||||
cls.add_method('Remove',
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')])
|
||||
## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function]
|
||||
cls.add_method('RemoveAll',
|
||||
'void',
|
||||
[])
|
||||
return
|
||||
|
||||
def register_Ns3PacketTagListTagData_methods(root_module, cls):
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor]
|
||||
cls.add_constructor([])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')])
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable]
|
||||
cls.add_instance_attribute('count', 'uint32_t', is_const=False)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable]
|
||||
cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable]
|
||||
cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False)
|
||||
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable]
|
||||
cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
|
||||
return
|
||||
|
||||
def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls):
|
||||
@@ -2116,6 +2161,38 @@ def register_Ns3Simulator_methods(root_module, cls):
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
def register_Ns3Tag_methods(root_module, cls):
|
||||
## tag.h (module 'network'): ns3::Tag::Tag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Tag const &', 'arg0')])
|
||||
## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_virtual=True)
|
||||
## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3TagBuffer_methods(root_module, cls):
|
||||
## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')])
|
||||
@@ -2264,8 +2341,8 @@ def register_Ns3TimerImpl_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3TypeId_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('==')
|
||||
## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor]
|
||||
@@ -2445,6 +2522,8 @@ def register_Ns3Empty_methods(root_module, cls):
|
||||
return
|
||||
|
||||
def register_Ns3Int64x64_t_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
|
||||
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
|
||||
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
|
||||
@@ -2496,9 +2575,7 @@ def register_Ns3Int64x64_t_methods(root_module, cls):
|
||||
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('>')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right'))
|
||||
cls.add_output_stream_operator()
|
||||
@@ -3176,6 +3253,11 @@ def register_Ns3Socket_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::Socket::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function]
|
||||
cls.add_method('IsRecvPktInfo',
|
||||
'bool',
|
||||
@@ -3329,46 +3411,155 @@ def register_Ns3Socket_methods(root_module, cls):
|
||||
visibility='protected')
|
||||
return
|
||||
|
||||
def register_Ns3Tag_methods(root_module, cls):
|
||||
cls.add_output_stream_operator()
|
||||
## tag.h (module 'network'): ns3::Tag::Tag() [constructor]
|
||||
def register_Ns3SocketAddressTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag(ns3::SocketAddressTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketAddressTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Tag const &', 'arg0')])
|
||||
## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_virtual=True)
|
||||
## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function]
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::Address ns3::SocketAddressTag::GetAddress() const [member function]
|
||||
cls.add_method('GetAddress',
|
||||
'ns3::Address',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketAddressTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketAddressTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function]
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function]
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_pure_virtual=True, is_const=True, is_virtual=True)
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function]
|
||||
cls.add_method('SetAddress',
|
||||
'void',
|
||||
[param('ns3::Address', 'addr')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTtlTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketIpTtlTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function]
|
||||
cls.add_method('GetTtl',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function]
|
||||
cls.add_method('SetTtl',
|
||||
'void',
|
||||
[param('uint8_t', 'ttl')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Disable() [member function]
|
||||
cls.add_method('Disable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Enable() [member function]
|
||||
cls.add_method('Enable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketSetDontFragmentTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function]
|
||||
cls.add_method('IsEnabled',
|
||||
'bool',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3Time_methods(root_module, cls):
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
|
||||
cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
|
||||
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
|
||||
cls.add_binary_comparison_operator('<')
|
||||
cls.add_binary_comparison_operator('>')
|
||||
cls.add_binary_comparison_operator('!=')
|
||||
cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
|
||||
cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
|
||||
cls.add_output_stream_operator()
|
||||
cls.add_binary_comparison_operator('<=')
|
||||
@@ -5740,10 +5931,11 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
cls.add_method('AddHeader',
|
||||
'void',
|
||||
[param('ns3::Header const &', 'header')])
|
||||
## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Ptr<const ns3::Tag> tag) [member function]
|
||||
## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function]
|
||||
cls.add_method('AddPacketTag',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Tag const >', 'tag')])
|
||||
[param('ns3::Tag const &', 'tag')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function]
|
||||
cls.add_method('AddPaddingAtEnd',
|
||||
'void',
|
||||
@@ -5802,6 +5994,11 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
'ns3::Ptr< ns3::NixVector >',
|
||||
[],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function]
|
||||
cls.add_method('GetPacketTagIterator',
|
||||
'ns3::PacketTagIterator',
|
||||
[],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
@@ -5827,10 +6024,10 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[param('ns3::Header &', 'header')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): ns3::Ptr<const ns3::Tag> ns3::Packet::PeekPacketTag(ns3::TypeId tagType) const [member function]
|
||||
## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function]
|
||||
cls.add_method('PeekPacketTag',
|
||||
'ns3::Ptr< ns3::Tag const >',
|
||||
[param('ns3::TypeId', 'tagType')],
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')],
|
||||
is_const=True)
|
||||
## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function]
|
||||
cls.add_method('PeekTrailer',
|
||||
@@ -5871,10 +6068,10 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
cls.add_method('RemoveHeader',
|
||||
'uint32_t',
|
||||
[param('ns3::Header &', 'header')])
|
||||
## packet.h (module 'network'): ns3::Ptr<const ns3::Tag> ns3::Packet::RemovePacketTag(ns3::TypeId tagType) [member function]
|
||||
## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function]
|
||||
cls.add_method('RemovePacketTag',
|
||||
'ns3::Ptr< ns3::Tag const >',
|
||||
[param('ns3::TypeId', 'tagType')])
|
||||
'bool',
|
||||
[param('ns3::Tag &', 'tag')])
|
||||
## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function]
|
||||
cls.add_method('RemoveTrailer',
|
||||
'uint32_t',
|
||||
@@ -5890,148 +6087,6 @@ def register_Ns3Packet_methods(root_module, cls):
|
||||
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketAddressTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag(ns3::SocketAddressTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketAddressTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::Address ns3::SocketAddressTag::GetAddress() const [member function]
|
||||
cls.add_method('GetAddress',
|
||||
'ns3::Address',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketAddressTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketAddressTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function]
|
||||
cls.add_method('SetAddress',
|
||||
'void',
|
||||
[param('ns3::Address', 'addr')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketIpTtlTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTtlTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketIpTtlTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function]
|
||||
cls.add_method('GetTtl',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function]
|
||||
cls.add_method('SetTtl',
|
||||
'void',
|
||||
[param('uint8_t', 'ttl')])
|
||||
return
|
||||
|
||||
def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
|
||||
## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor]
|
||||
cls.add_constructor([])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Disable() [member function]
|
||||
cls.add_method('Disable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Enable() [member function]
|
||||
cls.add_method('Enable',
|
||||
'void',
|
||||
[])
|
||||
## socket.h (module 'network'): ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function]
|
||||
cls.add_method('GetInstanceTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): uint32_t ns3::SocketSetDontFragmentTag::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## socket.h (module 'network'): bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function]
|
||||
cls.add_method('IsEnabled',
|
||||
'bool',
|
||||
[],
|
||||
is_const=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function]
|
||||
cls.add_method('Print',
|
||||
'void',
|
||||
[param('std::ostream &', 'os')],
|
||||
is_const=True, is_virtual=True)
|
||||
## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function]
|
||||
cls.add_method('Serialize',
|
||||
'void',
|
||||
[param('ns3::TagBuffer', 'i')],
|
||||
is_const=True, is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3TimeChecker_methods(root_module, cls):
|
||||
## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor]
|
||||
cls.add_constructor([])
|
||||
@@ -6152,83 +6207,6 @@ def register_Ns3AddressValue_methods(root_module, cls):
|
||||
[param('ns3::Address const &', 'value')])
|
||||
return
|
||||
|
||||
def register_Ns3Ipv4ListRouting_methods(root_module, cls):
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting(ns3::Ipv4ListRouting const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Ipv4ListRouting const &', 'arg0')])
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting() [constructor]
|
||||
cls.add_constructor([])
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::AddRoutingProtocol(ns3::Ptr<ns3::Ipv4RoutingProtocol> routingProtocol, int16_t priority) [member function]
|
||||
cls.add_method('AddRoutingProtocol',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): uint32_t ns3::Ipv4ListRouting::GetNRoutingProtocols() const [member function]
|
||||
cls.add_method('GetNRoutingProtocols',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv4RoutingProtocol> ns3::Ipv4ListRouting::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function]
|
||||
cls.add_method('GetRoutingProtocol',
|
||||
'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
|
||||
[param('uint32_t', 'index'), param('int16_t &', 'priority', direction=2)],
|
||||
is_const=True, is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
|
||||
cls.add_method('NotifyAddAddress',
|
||||
'void',
|
||||
[param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceDown(uint32_t interface) [member function]
|
||||
cls.add_method('NotifyInterfaceDown',
|
||||
'void',
|
||||
[param('uint32_t', 'interface')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceUp(uint32_t interface) [member function]
|
||||
cls.add_method('NotifyInterfaceUp',
|
||||
'void',
|
||||
[param('uint32_t', 'interface')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
|
||||
cls.add_method('NotifyRemoveAddress',
|
||||
'void',
|
||||
[param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::PrintRoutingTable(ns3::Ptr<ns3::OutputStreamWrapper> stream) const [member function]
|
||||
cls.add_method('PrintRoutingTable',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
|
||||
is_const=True, is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): bool ns3::Ipv4ListRouting::RouteInput(ns3::Ptr<ns3::Packet const> p, ns3::Ipv4Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void, ns3::Ptr<ns3::Ipv4Route>, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv4MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void, ns3::Ptr<ns3::Packet const>, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function]
|
||||
cls.add_method('RouteInput',
|
||||
'bool',
|
||||
[param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv4Route> ns3::Ipv4ListRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv4Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
|
||||
cls.add_method('RouteOutput',
|
||||
'ns3::Ptr< ns3::Ipv4Route >',
|
||||
[param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice >', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::SetIpv4(ns3::Ptr<ns3::Ipv4> ipv4) [member function]
|
||||
cls.add_method('SetIpv4',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')],
|
||||
is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoDispose() [member function]
|
||||
cls.add_method('DoDispose',
|
||||
'void',
|
||||
[],
|
||||
visibility='protected', is_virtual=True)
|
||||
## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoStart() [member function]
|
||||
cls.add_method('DoStart',
|
||||
'void',
|
||||
[],
|
||||
visibility='protected', is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3AodvDuplicatePacketDetection_methods(root_module, cls):
|
||||
## aodv-dpd.h (module 'aodv'): ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection(ns3::aodv::DuplicatePacketDetection const & arg0) [copy constructor]
|
||||
cls.add_constructor([param('ns3::aodv::DuplicatePacketDetection const &', 'arg0')])
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/address.h"
|
||||
#include "ns3/inet-socket-address.h"
|
||||
#include "ns3/inet6-socket-address.h"
|
||||
#include "ns3/node.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/data-rate.h"
|
||||
@@ -240,12 +242,30 @@ void OnOffApplication::ScheduleStopEvent ()
|
||||
void OnOffApplication::SendPacket ()
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
NS_LOG_LOGIC ("sending packet at " << Simulator::Now ());
|
||||
|
||||
NS_ASSERT (m_sendEvent.IsExpired ());
|
||||
Ptr<Packet> packet = Create<Packet> (m_pktSize);
|
||||
m_txTrace (packet);
|
||||
m_socket->Send (packet);
|
||||
m_totBytes += m_pktSize;
|
||||
if (InetSocketAddress::IsMatchingType (m_peer))
|
||||
{
|
||||
NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds ()
|
||||
<< "s on-off application sent "
|
||||
<< packet->GetSize () << " bytes to "
|
||||
<< InetSocketAddress::ConvertFrom(m_peer).GetIpv4 ()
|
||||
<< " port " << InetSocketAddress::ConvertFrom (m_peer).GetPort ()
|
||||
<< " total Tx " << m_totBytes << " bytes");
|
||||
}
|
||||
else if (Inet6SocketAddress::IsMatchingType (m_peer))
|
||||
{
|
||||
NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds ()
|
||||
<< "s on-off application sent "
|
||||
<< packet->GetSize () << " bytes to "
|
||||
<< Inet6SocketAddress::ConvertFrom(m_peer).GetIpv6 ()
|
||||
<< " port " << Inet6SocketAddress::ConvertFrom (m_peer).GetPort ()
|
||||
<< " total Tx " << m_totBytes << " bytes");
|
||||
}
|
||||
m_lastStartTime = Simulator::Now ();
|
||||
m_residualBits = 0;
|
||||
ScheduleNextTx ();
|
||||
|
||||
@@ -152,17 +152,6 @@ void PacketSink::StopApplication () // Called at time specified by Stop
|
||||
}
|
||||
}
|
||||
|
||||
std::string PrintStats (Address& from, uint32_t packetSize, uint32_t totalRxSize)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
|
||||
oss << "Received " << packetSize << " bytes from "
|
||||
<< address.GetIpv4 () << " [" << address << "]"
|
||||
<< " total Rx " << totalRxSize;
|
||||
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
void PacketSink::HandleRead (Ptr<Socket> socket)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << socket);
|
||||
@@ -174,34 +163,38 @@ void PacketSink::HandleRead (Ptr<Socket> socket)
|
||||
{ //EOF
|
||||
break;
|
||||
}
|
||||
m_totalRx += packet->GetSize ();
|
||||
if (InetSocketAddress::IsMatchingType (from))
|
||||
{
|
||||
m_totalRx += packet->GetSize ();
|
||||
NS_LOG_INFO (PrintStats (from, packet->GetSize (), m_totalRx));
|
||||
NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds ()
|
||||
<< "s packet sink received "
|
||||
<< packet->GetSize () << " bytes from "
|
||||
<< InetSocketAddress::ConvertFrom(from).GetIpv4 ()
|
||||
<< " port " << InetSocketAddress::ConvertFrom (from).GetPort ()
|
||||
<< " total Rx " << m_totalRx << " bytes");
|
||||
}
|
||||
else if (Inet6SocketAddress::IsMatchingType (from))
|
||||
{
|
||||
m_totalRx += packet->GetSize ();
|
||||
Inet6SocketAddress address = Inet6SocketAddress::ConvertFrom (from);
|
||||
NS_LOG_INFO ("Received " << packet->GetSize () << " bytes from " <<
|
||||
address.GetIpv6 () << " [" << address << "]"
|
||||
<< " total Rx " << m_totalRx);
|
||||
//cast address to void , to suppress 'address' set but not used
|
||||
//compiler warning in optimized builds
|
||||
(void) address;
|
||||
NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds ()
|
||||
<< "s packet sink received "
|
||||
<< packet->GetSize () << " bytes from "
|
||||
<< Inet6SocketAddress::ConvertFrom(from).GetIpv6 ()
|
||||
<< " port " << Inet6SocketAddress::ConvertFrom (from).GetPort ()
|
||||
<< " total Rx " << m_totalRx << " bytes");
|
||||
}
|
||||
m_rxTrace (packet, from);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PacketSink::HandlePeerClose (Ptr<Socket> socket)
|
||||
{
|
||||
NS_LOG_INFO ("PktSink, peerClose");
|
||||
NS_LOG_FUNCTION (this << socket);
|
||||
}
|
||||
|
||||
void PacketSink::HandlePeerError (Ptr<Socket> socket)
|
||||
{
|
||||
NS_LOG_INFO ("PktSink, peerError");
|
||||
NS_LOG_FUNCTION (this << socket);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -403,9 +403,9 @@ def register_Ns3Ipv4Address_methods(root_module, cls):
|
||||
'ns3::Ipv4Address',
|
||||
[param('uint8_t const *', 'buf')],
|
||||
is_static=True)
|
||||
## ipv4-address.h (module 'network'): uint32_t const & ns3::Ipv4Address::Get() const [member function]
|
||||
## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Address::Get() const [member function]
|
||||
cls.add_method('Get',
|
||||
'uint32_t const &',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetAny() [member function]
|
||||
|
||||
@@ -403,9 +403,9 @@ def register_Ns3Ipv4Address_methods(root_module, cls):
|
||||
'ns3::Ipv4Address',
|
||||
[param('uint8_t const *', 'buf')],
|
||||
is_static=True)
|
||||
## ipv4-address.h (module 'network'): uint32_t const & ns3::Ipv4Address::Get() const [member function]
|
||||
## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Address::Get() const [member function]
|
||||
cls.add_method('Get',
|
||||
'uint32_t const &',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetAny() [member function]
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
callback_classes = [
|
||||
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,173 @@
|
||||
EPSTOPDF = epstopdf
|
||||
DIA = dia
|
||||
CONVERT = convert
|
||||
|
||||
SOURCE = source
|
||||
FIGURES = $(SOURCE)/figures
|
||||
|
||||
# specify figures from which .png and .pdf figures need to be
|
||||
# generated (all dia and eps figures)
|
||||
IMAGES_EPS =
|
||||
|
||||
# specify figures for build process (all eps figures)
|
||||
GRAPHS_EPS =
|
||||
|
||||
# rescale pdf figures as necessary
|
||||
$(FIGURES)/testbed.pdf_width = 5in
|
||||
|
||||
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
|
||||
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
|
||||
|
||||
IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
|
||||
|
||||
%.eps : %.dia; $(DIA) -t eps $< -e $@
|
||||
%.png : %.dia; $(DIA) -t png $< -e $@
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
|
||||
GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png}
|
||||
GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf}
|
||||
|
||||
GRAPHS = $(GRAPHS_EPS) $(GRAPHS_PNG) $(GRAPHS_PDF)
|
||||
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE)
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
-rm -f $(IMAGES_PNG)
|
||||
-rm -f $(IMAGES_PDF)
|
||||
-rm -f $(GRAPHS_PNG)
|
||||
-rm -f $(GRAPHS_PDF)
|
||||
|
||||
frag: pickle
|
||||
@if test ! -d $(BUILDDIR)/frag; then mkdir $(BUILDDIR)/frag; fi
|
||||
pushd $(BUILDDIR)/frag && ../../pickle-to-xml.py ../pickle/index.fpickle > navigation.xml && popd
|
||||
cp -r $(BUILDDIR)/pickle/_images $(BUILDDIR)/frag
|
||||
|
||||
html: $(IMAGES) ${GRAPHS}
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml: $(IMAGES)
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml: $(IMAGES)
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle: $(IMAGES)
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json: $(IMAGES)
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp: $(IMAGES)
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp: $(IMAGES)
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ns-3.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ns-3.qhc"
|
||||
|
||||
devhelp: $(IMAGES)
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/ns-3"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ns-3"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub: $(IMAGES)
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex: $(IMAGES) ${GRAPHS}
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf: $(IMAGES) ${GRAPHS}
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
make -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text: $(IMAGES)
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man: $(IMAGES)
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
changes: $(IMAGES)
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck: $(IMAGEs)
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest: $(IMAGES)
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMPFILE=`mktemp`
|
||||
|
||||
echo "\documentclass{book}
|
||||
\usepackage{pdfpages}
|
||||
\begin{document}
|
||||
\includepdf[width=${1},fitpaper]{${2}}
|
||||
\end{document}" >${TMPFILE}.tex
|
||||
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
|
||||
cp ${TMPFILE}.pdf ${3}
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
cd .. include:: replace.txt
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
Design documentation
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
Overview
|
||||
++++++++
|
||||
|
||||
The Buildings module provides:
|
||||
|
||||
#. a new class (``Building``) that models the presence of a building in a simulation scenario;
|
||||
#. a new mobility model (``BuildingsMobilityModel``) that allows to specify the location, size and characteristics of buildings present in the simulated area, and allows the placement of nodes inside those buildings;
|
||||
#. a container class with the definition of the most useful pathloss models and the correspondent variables called ``BuildingsPropagationLossModel``.
|
||||
#. a new propagation model (``HybridBuildingsPropagationLossModel``) working with the mobility model just introduced, that allows to model the phenomenon of indoor/outdoor propagation in the presence of buildings.
|
||||
#. a simplified model working only with Okumura Hata (``OhBuildingsPropagationLossModel``) considering the phenomenon of indoor/outdoor propagation in the presence of buildings.
|
||||
|
||||
The models have been designed with LTE in mind, though their implementation is in fact independent from any LTE-specific code, and can be used with other ns-3 wireless technologies as well (e.g., wifi, wimax).
|
||||
|
||||
The ``HybridBuildingsPropagationLossModel`` pathloss model included is obtained through a combination of several well known pathloss models in order to mimic different environmental scenarios such as urban, suburban and open areas. Moreover, the model considers both outdoor and indoor indoor and outdoor communication has to be included since HeNB might be installed either within building and either outside. In case of indoor communication, the model has to consider also the type of building in outdoor <-> indoor communication according to some general criteria such as the wall penetration losses of the common materials; moreover it includes some general configuration for the internal walls in indoor communications.
|
||||
|
||||
The ``OhBuildingsPropagationLossModel`` pathloss model has been created for simplifying the previous one removing the thresholds for switching from one model to other. For doing this it has been used only one propagation model from the one available (i.e., the Okumura Hata). The presence of building is still considered in the model; therefore all the considerations of above regarding the building type are still valid. The same consideration can be done for what concern the environmental scenario and frequency since both of them are parameters of the model considered.
|
||||
|
||||
|
||||
The Building class
|
||||
++++++++++++++++++
|
||||
|
||||
The model includes a specific class called ``Building`` which contains a ns3 ``Box`` class for defining the dimension of the building. In order to implements the characteristics of the pathloss models included, the ``Building`` class supports the following attributes:
|
||||
|
||||
* building type:
|
||||
|
||||
* Residential (default value)
|
||||
* Office
|
||||
* Commercial
|
||||
|
||||
* external walls type
|
||||
|
||||
* Wood
|
||||
* ConcreteWithWindows (default value)
|
||||
* ConcreteWithoutWindows
|
||||
* StoneBlocks
|
||||
|
||||
* number of floors (default value 1, which means only ground-floor)
|
||||
* number of rooms in x-axis (default value 1)
|
||||
* number of rooms in y-axis (default value 1)
|
||||
|
||||
The Building class is based on the following assumptions:
|
||||
|
||||
* a buildings is represented as a rectangular parallelepiped (i.e., a box)
|
||||
* the walls are parallel to the x, y, and z axis
|
||||
* a building is divided into a grid of rooms, identified by the following parameters:
|
||||
|
||||
* number of floors
|
||||
* number of rooms along the x-axis
|
||||
* number of rooms along the y-axis
|
||||
|
||||
* the z axis is the vertical axis, i.e., floor numbers increase for increasing z axis values
|
||||
* the x and y room indices start from 1 and increase along the x and y axis respectively
|
||||
* all rooms in a building have equal size
|
||||
|
||||
|
||||
|
||||
The BuildingsMobilityModel class
|
||||
++++++++++++++++++++++++++++++++
|
||||
|
||||
The ``BuildingsMobilityModel`` class, which inherits from the ns3 class ``MobilityModel``, is in charge of managing the standard mobility functionalities plus providing information about the position of a node with respect to building. The information managed by ``BuildingsMobilityModel`` is:
|
||||
|
||||
* whether the node is indoor or outdoor
|
||||
* if indoor:
|
||||
|
||||
* in which building the node is
|
||||
* in which room the node is positioned (x, y and floor room indices)
|
||||
|
||||
The class ``BuildingsMobilityModel`` is used by ``BuildingsPropagationLossModel`` class, which inherits from the ns3 class ``PropagationLossModel`` and manages the pathloss computation of the single components and their composition according to the nodes' positions. Moreover, it implements also the shadowing, that is the loss due to obstacles in the main path (i.e., vegetation, buildings, etc.).
|
||||
|
||||
|
||||
|
||||
|
||||
ItuR1238PropagationLossModel
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
This class implements a building-dependent indoor propagation loss model based on the ITU P.1238 model, which includes losses due to type of building (i.e., residential, office and commercial).
|
||||
The analytical expression is given in the following.
|
||||
|
||||
.. math::
|
||||
|
||||
L_\mathrm{total} = 20\log f + N\log d + L_f(n)- 28 [dB]
|
||||
|
||||
where:
|
||||
|
||||
:math:`N = \left\{ \begin{array}{lll} 28 & residential \\ 30 & office \\ 22 & commercial\end{array} \right.` : power loss coefficient [dB]
|
||||
|
||||
:math:`L_f = \left\{ \begin{array}{lll} 4n & residential \\ 15+4(n-1) & office \\ 6+3(n-1) & commercial\end{array} \right.`
|
||||
|
||||
:math:`n` : number of floors between base station and mobile (:math:`n\ge 1`)
|
||||
|
||||
:math:`f` : frequency [MHz]
|
||||
|
||||
:math:`d` : distance (where :math:`d > 1`) [m]
|
||||
|
||||
|
||||
|
||||
|
||||
BuildingsPropagationLossModel
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
The BuildingsPropagationLossModel provides an additional set of building-dependent pathloss model elements that are used to implement different pathloss logics. These pathloss model elements are described in the following subsections.
|
||||
|
||||
|
||||
|
||||
External Wall Loss (EWL)
|
||||
-------------------------
|
||||
|
||||
This component models the penetration loss through walls for indoor to outdoor communications and vice-versa. The values are taken from the [cost231]_ model.
|
||||
|
||||
* Wood ~ 4 dB
|
||||
* Concrete with windows (not metallized) ~ 7 dB
|
||||
* Concrete without windows ~ 15 dB (spans between 10 and 20 in COST231)
|
||||
* Stone blocks ~ 12 dB
|
||||
|
||||
|
||||
Internal Walls Loss (IWL)
|
||||
-------------------------
|
||||
|
||||
This component models the penetration loss occurring in indoor-to-indoor communications within the same building. The total loss is calculated assuming that each single internal wall has a constant penetration loss :math:`L_{siw}`, and approximating the number of walls that are penetrated with the manhattan distance (in number of rooms) between the transmitter and the receiver. In detail, let :math:`x_1`, :math:`y_1`, :math:`x_2`, :math:`y_2` denote the room number along the :math:`x` and :math:`y` axis respectively for user 1 and 2; the total loss :math:`L_{IWL}` is calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
L_{IWL} = L_{siw} (|x_1 -x_2| + |y_1 - y_2|)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Height Gain Model (HG)
|
||||
-----------------------
|
||||
|
||||
This component model the gain due to the fact that the transmitting device is on a floor above the ground. In the literature [turkmani]_ this gain has been evaluated as about 2 dB per floor. This gain can be applied to all the indoor to outdoor communications and vice-versa.
|
||||
|
||||
|
||||
Shadowing Model
|
||||
---------------
|
||||
|
||||
The shadowing is modeled according to a log-normal distribution with variable standard deviation as function of the connection characteristics. In the implementation we considered three main possible scenarios which correspond to three standard deviations (i.e., the mean is always 0), in detail:
|
||||
|
||||
* outdoor (``m_shadowingSigmaOutdoor``, defaul value of 7 dB) :math:`\rightarrow X_\mathrm{O} \sim N(\mu_\mathrm{O}, \sigma_\mathrm{O}^2)`.
|
||||
* indoor (``m_shadowingSigmaIndoor``, defaul value of 10 dB) :math:`\rightarrow X_\mathrm{I} \sim N(\mu_\mathrm{I}, \sigma_\mathrm{I}^2)`.
|
||||
* external walls penetration (``m_shadowingSigmaExtWalls``, default value 5 dB) :math:`\rightarrow X_\mathrm{W} \sim N(\mu_\mathrm{W}, \sigma_\mathrm{W}^2)`
|
||||
|
||||
The simulator generates a shadowing value per each active link according to nodes' position the first time the link is used for transmitting. In case of transmissions from outdoor nodes to indoor ones, and vice-versa, the standard deviation (:math:`\sigma_\mathrm{IO}`) has to be calculated as the square root of the sum of the quadratic values of the standard deviatio in case of outdoor nodes and the one for the external walls penetration. This is due to the fact that that the components producing the shadowing are independent of each other; therefore, the variance of a distribution resulting from the sum of two independent normal ones is the sum of the variances.
|
||||
|
||||
.. math::
|
||||
|
||||
X \sim N(\mu,\sigma^2) \mbox{ and } Y \sim N(\nu,\tau^2)
|
||||
|
||||
Z = X + Y \sim Z (\mu + \nu, \sigma^2 + \tau^2)
|
||||
|
||||
\Rightarrow \sigma_\mathrm{IO} = \sqrt{\sigma_\mathrm{O}^2 + \sigma_\mathrm{W}^2}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Pathloss logics
|
||||
+++++++++++++++
|
||||
|
||||
In the following we describe the different pathloss logic that are implemented by inheriting from BuildingsPropagationLossModel.
|
||||
|
||||
|
||||
HybridBuildingsPropagationLossModel
|
||||
-----------------------------------
|
||||
|
||||
The ``HybridBuildingsPropagationLossModel`` pathloss model included is obtained through a combination of several well known pathloss models in order to mimic different outdoor and indoor scenarios, as well as indoor-to-outdoor and outdoor-to-indoor scenarios. In detail, the class ``HybridBuildingsPropagationLossModel`` integrates the following pathloss models:
|
||||
|
||||
* OkumuraHataPropagationLossModel (OH) (at frequencies > 2.3 GHz substituted by Kun2600MhzPropagationLossModel)
|
||||
* ItuR1411LosPropagationLossModel and ItuR1411NlosOverRooftopPropagationLossModel (I1411)
|
||||
* ItuR1238PropagationLossModel (I1238)
|
||||
* the pathloss elements of the BuildingsPropagationLossModel (EWL, HG, IWL)
|
||||
|
||||
The following pseudo-code illustrates how the different pathloss model elements described above are integrated in ``HybridBuildingsPropagationLossModel``::
|
||||
|
||||
if (txNode is outdoor)
|
||||
then
|
||||
if (rxNode is outdoor)
|
||||
then
|
||||
if (distance > 1 km)
|
||||
then
|
||||
if (rxNode or txNode is below the rooftop)
|
||||
then
|
||||
L = I1411
|
||||
else
|
||||
L = OH
|
||||
else
|
||||
L = I1411
|
||||
else (rxNode is indoor)
|
||||
if (distance > 1 km)
|
||||
then
|
||||
if (rxNode or txNode is below the rooftop)
|
||||
L = I1411 + EWL + HG
|
||||
else
|
||||
L = OH + EWL + HG
|
||||
else
|
||||
L = I1411 + EWL + HG
|
||||
else (txNode is indoor)
|
||||
if (rxNode is indoor)
|
||||
then
|
||||
if (same building)
|
||||
then
|
||||
L = I1238 + IWL
|
||||
else
|
||||
L = I1411 + 2*EWL
|
||||
else (rxNode is outdoor)
|
||||
if (distance > 1 km)
|
||||
then
|
||||
if (rxNode or txNode is below the rooftop)
|
||||
then
|
||||
L = I1411 + EWL + HG
|
||||
else
|
||||
L = OH + EWL + HG
|
||||
else
|
||||
L = I1411 + EWL
|
||||
|
||||
|
||||
|
||||
|
||||
We note that, for the case of communication between two nodes below rooftop level with distance is greater then 1 km, we still consider the I1411 model, since OH is specifically designed for macro cells and therefore for antennas above the roof-top level.
|
||||
|
||||
For the ITU-R P.1411 model we consider both the LOS and NLoS versions. In particular, we considers the LoS propagation for distances that are shorted than a tunable threshold (``m_itu1411NlosThreshold``). In case on NLoS propagation, the over the roof-top model is taken in consideration for modeling both macro BS and SC. In case on NLoS several parameters scenario dependent have been included, such as average street width, orientation, etc. The values of such parameters have to be properly set according to the scenario implemented, the model does not calculate natively their values. In case any values is provided, the standard ones are used, apart for the height of the mobile and BS, which instead their integrity is tested directly in the code (i.e., they have to be greater then zero). In the following we give the expressions of the components of the model.
|
||||
|
||||
We also note that the use of different propagation models (OH, I1411, I1238 with their variants) in HybridBuildingsPropagationLossModel can result in discontinuities of the pathloss with respect to distance. A proper tuning of the attributes (especially the distance threshold attributes) can avoid these discontinuities. However, since the behavior of each model depends on several other parameters (frequency, node heigth, etc), there is no default value of these thresholds that can avoid the discontinuities in all possible configurations. Hence, an appropriate tuning of these parameters is left to the user.
|
||||
|
||||
|
||||
OhBuildingsPropagationLossModel
|
||||
-------------------------------
|
||||
|
||||
The ``OhBuildingsPropagationLossModel`` class has been created as a simple means to solve the discontinuity problems of ``HybridBuildingsPropagationLossModel`` without doing scenario-specific parameter tuning. The solution is to use only one propagation loss model (i.e., Okumura Hata), while retaining the structure of the pathloss logic for the calculation of other path loss components (such as wall penetration losses). The result is a model that is free of discontinuities (except those due to walls), but that is less realistic overall for a generic scenario with buildings and outdoor/indoor users, e.g., because Okumura Hata is not suitable neither for indoor communications nor for outdoor communications below rooftop level.
|
||||
|
||||
In detail, the class ``OhBuildingsPropagationLossModel`` integrates the following pathloss models:
|
||||
|
||||
* OkumuraHataPropagationLossModel (OH)
|
||||
* the pathloss elements of the BuildingsPropagationLossModel (EWL, HG, IWL)
|
||||
|
||||
The following pseudo-code illustrates how the different pathloss model elements described above are integrated in ``OhBuildingsPropagationLossModel``::
|
||||
|
||||
if (txNode is outdoor)
|
||||
then
|
||||
if (rxNode is outdoor)
|
||||
then
|
||||
L = OH
|
||||
else (rxNode is indoor)
|
||||
L = OH + EWL
|
||||
else (txNode is indoor)
|
||||
if (rxNode is indoor)
|
||||
then
|
||||
if (same building)
|
||||
then
|
||||
L = OH + IWL
|
||||
else
|
||||
L = OH + 2*EWL
|
||||
else (rxNode is outdoor)
|
||||
L = OH + EWL
|
||||
|
||||
We note that OhBuildingsPropagationLossModel is a significant simplification with respect to HybridBuildingsPropagationLossModel, due to the fact that OH is used always. While this gives a less accurate model in some scenarios (especially below rooftop and indoor), it effectively avoids the issue of pathloss discontinuities that affects HybridBuildingsPropagationLossModel.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
.. include:: replace.txt
|
||||
|
||||
|
||||
.. [turkmani] Turkmani A.M.D., J.D. Parson and D.G. Lewis, "Radio propagation into buildings at 441, 900 and 1400 MHz",
|
||||
in Proc. of 4th Int. Conference on Land Mobile Radio, 1987.
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
+++++++++++++++++++++++++++++++++++++
|
||||
Testing Documentation
|
||||
+++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
To test and validate the ns-3 Building Pathloss module, some test suites is provided which are integrated with the ns-3 test framework. To run them, you need to have configured the build of the simulator in this way::
|
||||
|
||||
./waf configure --enable-tests --enable-modules=buildings
|
||||
./test.py
|
||||
|
||||
The above will run not only the test suites belonging to the buildings module, but also those belonging to all the other ns-3 modules on which the buildings module depends. See the ns-3 manual for generic information on the testing framework.
|
||||
|
||||
You can get a more detailed report in HTML format in this way::
|
||||
|
||||
./test.py -w results.html
|
||||
|
||||
After the above command has run, you can view the detailed result for each test by opening the file ``results.html`` with a web browser.
|
||||
|
||||
You can run each test suite separately using this command::
|
||||
|
||||
./test.py -s test-suite-name
|
||||
|
||||
For more details about ``test.py`` and the ns-3 testing framework, please refer to the ns-3 manual.
|
||||
|
||||
|
||||
|
||||
Description of the test suites
|
||||
******************************
|
||||
|
||||
|
||||
BuildingsHelper test
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The test suite ``buildings-helper`` checks that the method ``BuildingsHelper::MakeAllInstancesConsistent ()`` works properly, i.e., that the BuildingsHelper is successful in locating if nodes are outdoor or indoor, and if indoor that they are located in the correct building, room and floor. Several test cases are provided with different buildings (having different size, position, rooms and floors) and different node positions. The test passes if each every node is located correctly.
|
||||
|
||||
|
||||
BuildingPositionAllocator test
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The test suite ``building-position-allocator`` feature two test cases that check that respectively RandomRoomPositionAllocator and SameRoomPositionAllocator work properly. Each test cases involves a single 2x3x2 room building (total 12 rooms) at known coordinates and respectively 24 and 48 nodes. Both tests check that the number of nodes allocated in each room is the expected one and that the position of the nodes is also correct.
|
||||
|
||||
|
||||
Buildings Pathloss tests
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The test suite ``buildings-pathloss-model`` provides different unit tests that compare the expected results of the buildings pathloss module in specific scenarios with pre calculated values obtained offline with an Octave script (test/reference/buildings-pathloss.m). The tests are considered passed if the two values are equal up to a tolerance of 0.1, which is deemed appropriate for the typical usage of pathloss values (which are in dB).
|
||||
|
||||
In the following we detailed the scenarios considered, their selection has been done for covering the wide set of possible pathloss logic combinations. The pathloss logic results therefore implicitly tested.
|
||||
|
||||
Test #1 Okumura Hata
|
||||
--------------------
|
||||
|
||||
In this test we test the standard Okumura Hata model; therefore both eNB and UE are placed outside at a distance of 2000 m. The frequency used is the E-UTRA band #5, which correspond to 869 MHz (see table 5.5-1 of 36.101). The test includes also the validation of the areas extensions (i.e., urban, suburban and open-areas) and of the city size (small, medium and large).
|
||||
|
||||
Test #2 COST231 Model
|
||||
---------------------
|
||||
|
||||
This test is aimed at validating the COST231 model. The test is similar to the Okumura Hata one, except that the frequency used is the EUTRA band #1 (2140 MHz) and that the test can be performed only for large and small cities in urban scenarios due to model limitations.
|
||||
|
||||
Test #3 2.6 GHz model
|
||||
---------------------
|
||||
|
||||
This test validates the 2.6 GHz Kun model. The test is similar to Okumura Hata one except that the frequency is the EUTRA band #7 (2620 MHz) and the test can be performed only in urban scenario.
|
||||
|
||||
Test #4 ITU1411 LoS model
|
||||
-------------------------
|
||||
|
||||
This test is aimed at validating the ITU1411 model in case of line of sight within street canyons transmissions. In this case the UE is placed at 100 meters far from the eNB, since the threshold for switching between LoS and NLoS is left to default one (i.e., 200 m.).
|
||||
|
||||
Test #5 ITU1411 NLoS model
|
||||
--------------------------
|
||||
|
||||
This test is aimed at validating the ITU1411 model in case of non line of sight over the rooftop transmissions. In this case the UE is placed at 900 meters far from the eNB, in order to be above the threshold for switching between LoS and NLoS is left to default one (i.e., 200 m.).
|
||||
|
||||
Test #6 ITUP1238 model
|
||||
----------------------
|
||||
|
||||
This test is aimed at validating the ITUP1238 model in case of indoor transmissions. In this case both the UE and the eNB are placed in a residential building with walls made of concrete with windows. Ue is placed at the second floor and distances 30 meters far from the eNB, which is placed at the first floor.
|
||||
|
||||
Test #7 Outdoor -> Indoor with Okumura Hata model
|
||||
-------------------------------------------------
|
||||
|
||||
This test validates the outdoor to indoor transmissions for large distances. In this case the UE is placed in a residential building with wall made of concrete with windows and distances 2000 meters from the outdoor eNB.
|
||||
|
||||
Test #8 Outdoor -> Indoor with ITU1411 model
|
||||
-------------------------------------------------
|
||||
|
||||
This test validates the outdoor to indoor transmissions for short distances. In this case the UE is placed in a residential building with walls made of concrete with windows and distances 100 meters from the outdoor eNB.
|
||||
|
||||
|
||||
Test #9 Indoor -> Outdoor with ITU1411 model
|
||||
-------------------------------------------------
|
||||
|
||||
This test validates the outdoor to indoor transmissions for very short distances. In this case the eNB is placed in the second floor of a residential building with walls made of concrete with windows and distances 100 meters from the outdoor UE (i.e., LoS communication). Therefore the height gain has to be included in the pathloss evaluation.
|
||||
|
||||
Test #10 Indoor -> Outdoor with ITU1411 model
|
||||
-------------------------------------------------
|
||||
|
||||
This test validates the outdoor to indoor transmissions for short distances. In this case the eNB is placed in the second floor of a residential building with walls made of concrete with windows and distances 500 meters from the outdoor UE (i.e., NLoS communication). Therefore the height gain has to be included in the pathloss evaluation.
|
||||
|
||||
|
||||
Buildings Shadowing Test
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The test suite ``buildings-shadowing-test`` is a unit test intended to verify the statistics distribution characteristics of the shadowing are the one expected. The shadowing is modeled according to a normal distribution with mean :math:`\mu = 0` and variable standard deviation :math:`\sigma`, according to models commonly used in literature.
|
||||
The test generates 10,000 samples of shadowing by subtracting the deterministic component from the total loss returned by the ``BuildingPathlossModel``. The mean and variance of the shadowing samples are then used to verify whether the 99% confidence interval is respected by the sequence generated by the simulator.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
.. include:: replace.txt
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
User Documentation
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
|
||||
Main configurable parameters
|
||||
----------------------------
|
||||
|
||||
The ``Building`` class has the following configurable parameters:
|
||||
|
||||
* building type: Residential, Office and Commercial.
|
||||
* external walls type: Wood, ConcreteWithWindows, ConcreteWithoutWindows and StoneBlocks.
|
||||
* building bounds: a ``Box`` class with the building bounds.
|
||||
* number of floors.
|
||||
* number of rooms in x-axis and y-axis (rooms can be placed only in a grid way).
|
||||
|
||||
The ``BuildingMobilityLossModel`` parameter configurable with the ns3 attribute system is represented by the bound (string ``Bounds``) of the simulation area by providing a ``Box`` class with the area bounds. Moreover, by means of its methos the following parameters can be configured:
|
||||
|
||||
* the number of floor the node is placed (default 0).
|
||||
* the position in the rooms grid.
|
||||
|
||||
|
||||
The ``BuildingPropagationLossModel`` class has the following configurable parameters configurable with the attribute system:
|
||||
|
||||
* ``Frequency``: reference frequency (default 2160 MHz), note that by setting the frequency the wavelength is set accordingly automatically and viceversa).
|
||||
* ``Lambda``: the wavelength (0.139 meters, considering the above frequency).
|
||||
* ``ShadowSigmaOutdoor``: the standard deviation of the shadowing for outdoor nodes (defaul 7.0).
|
||||
* ``ShadowSigmaIndoor``: the standard deviation of the shadowing for indoor nodes (default 8.0).
|
||||
* ``ShadowSigmaExtWalls``: the standard deviation of the shadowing due to external walls penetration for outdoor to indoor communications (default 5.0).
|
||||
* ``RooftopLevel``: the level of the rooftop of the building in meters (default 20 meters).
|
||||
* ``Los2NlosThr``: the value of distance of the switching point between line-of-sigth and non-line-of-sight propagation model in meters (default 200 meters).
|
||||
* ``ITU1411DistanceThr``: the value of distance of the switching point between short range (ITU 1211) communications and long range (Okumura Hata) in meters (default 200 meters).
|
||||
* ``MinDistance``: the minimum distance in meters between two nodes for evaluating the pathloss (considered neglictible before this threshold) (default 0.5 meters).
|
||||
* ``Environment``: the environment scenario among Urban, SubUrban and OpenAreas (default Urban).
|
||||
* ``CitySize``: the dimension of the city among Small, Medium, Large (default Large).
|
||||
|
||||
In order to use the hybrid mode, the class to be used is the ``HybridBuildingMobilityLossModel``, which allows the selection of the proper pathloss model according to the pathloss logic presented in the design chapter. However, this solution has the problem that the pathloss model switching points might present discontinuities due to the different characteristics of the model. This implies that according to the specific scenario, the threshold used for switching have to be properly tuned.
|
||||
The simple ``OhBuildingMobilityLossModel`` overcome this problem by using only the Okumura Hata model and the wall penetration losses.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#####################################################
|
||||
Buildings Module
|
||||
#####################################################
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
buildings-design
|
||||
buildings-user
|
||||
buildings-testing
|
||||
buildings-references
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ns-3 documentation build configuration file, created by
|
||||
# sphinx-quickstart on Tue Dec 14 09:00:39 2010.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.pngmath',
|
||||
'sphinxcontrib.seqdiag']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'LENA'
|
||||
copyright = u'2011-2012, CTTC'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = 'M2'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = 'M2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
#htmlhelp_basename = 'ns-3doc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
#latex_paper_size = 'letter'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#latex_font_size = '10pt'
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('buildings', 'buildings.tex', u'Buildings Module Documentation', u'Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'ns-3-model-library', u'ns-3 Model Library',
|
||||
[u'ns-3 project'], 1)
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
#####################################################
|
||||
Buildings Module
|
||||
#####################################################
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
buildings-design
|
||||
buildings-user
|
||||
buildings-testing
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.. |ns3| replace:: *ns-3*
|
||||
|
||||
.. |ns2| replace:: *ns-2*
|
||||
@@ -0,0 +1,100 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
*/
|
||||
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/network-module.h"
|
||||
#include "ns3/mobility-module.h"
|
||||
#include "ns3/lte-module.h"
|
||||
#include "ns3/config-store.h"
|
||||
#include <ns3/buildings-helper.h>
|
||||
#include <ns3/hybrid-buildings-propagation-loss-model.h>
|
||||
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace ns3;
|
||||
using std::vector;
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
||||
double hEnb = 30.0;
|
||||
double hUe = 1.0;
|
||||
bool enbIndoor = false;
|
||||
bool ueIndoor = false;
|
||||
CommandLine cmd;
|
||||
|
||||
cmd.AddValue("hEnb", "Height of the eNB", hEnb);
|
||||
cmd.AddValue("hUe", "Height of UE", hUe);
|
||||
cmd.AddValue("enbIndoor", "Boolean for eNB Indoor/Outdoor selection", enbIndoor);
|
||||
cmd.AddValue("ueIndoor", "Boolean for UE Indoor/Outdoor selection", ueIndoor);
|
||||
cmd.Parse(argc, argv);
|
||||
|
||||
ConfigStore inputConfig;
|
||||
inputConfig.ConfigureDefaults ();
|
||||
|
||||
|
||||
// parse again so you can override default values from the command line
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
|
||||
std::ofstream outFile;
|
||||
outFile.open ("buildings-pathloss-profiler.out");
|
||||
if (!outFile.is_open ())
|
||||
{
|
||||
NS_FATAL_ERROR ("Can't open output file");
|
||||
}
|
||||
|
||||
Ptr<BuildingsMobilityModel> mmEnb = CreateObject<BuildingsMobilityModel> ();
|
||||
mmEnb->SetPosition (Vector (0.0, 0.0, hEnb));
|
||||
if (enbIndoor)
|
||||
{
|
||||
Ptr<Building> building1 = Create<Building> (-2, 2, -2, 2, 0.0, 20.0);
|
||||
building1->SetBuildingType (Building::Residential);
|
||||
building1->SetExtWallsType (Building::ConcreteWithWindows);
|
||||
}
|
||||
|
||||
BuildingsHelper::MakeConsistent (mmEnb);
|
||||
|
||||
Ptr<HybridBuildingsPropagationLossModel> propagationLossModel = CreateObject<HybridBuildingsPropagationLossModel> ();
|
||||
// cancel shadowing effect
|
||||
propagationLossModel->SetAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
|
||||
propagationLossModel->SetAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
|
||||
propagationLossModel->SetAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));
|
||||
|
||||
// propagationLossModel->SetAttribute ("Los2NlosThr", DoubleValue (1550.0));
|
||||
|
||||
//for (uint8_t i = 0; i < 23; i++)
|
||||
for (uint32_t i = 1; i < 2300; i++)
|
||||
{
|
||||
Ptr<BuildingsMobilityModel> mmUe = CreateObject<BuildingsMobilityModel> ();
|
||||
mmUe->SetPosition (Vector (i, 0.0, hUe));
|
||||
BuildingsHelper::MakeConsistent (mmUe);
|
||||
double loss = propagationLossModel->GetLoss (mmEnb, mmUe);
|
||||
outFile << i << "\t"
|
||||
<< loss
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
Simulator::Destroy ();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
def build(bld):
|
||||
obj = bld.create_ns3_program('buildings-pathloss-profiler',
|
||||
['buildings'])
|
||||
obj.source = 'buildings-pathloss-profiler.cc'
|
||||
@@ -0,0 +1,146 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2007 INRIA
|
||||
* Copyright (C) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es> (took position-allocator and turned it into building-allocator)
|
||||
*/
|
||||
#include "building-allocator.h"
|
||||
#include "ns3/building.h"
|
||||
#include "ns3/random-variable.h"
|
||||
#include "ns3/double.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/enum.h"
|
||||
#include "ns3/log.h"
|
||||
#include <cmath>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("BuildingAllocator");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (GridBuildingAllocator);
|
||||
|
||||
GridBuildingAllocator::GridBuildingAllocator ()
|
||||
: m_current (0)
|
||||
{
|
||||
m_buildingFactory.SetTypeId ("ns3::Building");
|
||||
m_lowerLeftPositionAllocator = CreateObject<GridPositionAllocator> ();
|
||||
m_upperRightPositionAllocator = CreateObject<GridPositionAllocator> ();
|
||||
}
|
||||
|
||||
GridBuildingAllocator::~GridBuildingAllocator ()
|
||||
{
|
||||
}
|
||||
|
||||
TypeId
|
||||
GridBuildingAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::GridBuildingAllocator")
|
||||
.SetParent<Object> ()
|
||||
.AddConstructor<GridBuildingAllocator> ()
|
||||
.AddAttribute ("GridWidth", "The number of objects layed out on a line.",
|
||||
UintegerValue (10),
|
||||
MakeUintegerAccessor (&GridBuildingAllocator::m_n),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
.AddAttribute ("MinX", "The x coordinate where the grid starts.",
|
||||
DoubleValue (1.0),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_xMin),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("MinY", "The y coordinate where the grid starts.",
|
||||
DoubleValue (0.0),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_yMin),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("LengthX", " the length of the wall of each building along the X axis.",
|
||||
DoubleValue (1.0),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_lengthX),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("LengthY", " the length of the wall of each building along the X axis.",
|
||||
DoubleValue (1.0),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_lengthY),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("DeltaX", "The x space between buildings.",
|
||||
DoubleValue (1.0),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_deltaX),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("DeltaY", "The y space between buildings.",
|
||||
DoubleValue (1.0),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_deltaY),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("Height", "The height of the building (roof level)",
|
||||
DoubleValue (10),
|
||||
MakeDoubleAccessor (&GridBuildingAllocator::m_height),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("LayoutType", "The type of layout.",
|
||||
EnumValue (GridPositionAllocator::ROW_FIRST),
|
||||
MakeEnumAccessor (&GridBuildingAllocator::m_layoutType),
|
||||
MakeEnumChecker (GridPositionAllocator::ROW_FIRST, "RowFirst",
|
||||
GridPositionAllocator::COLUMN_FIRST, "ColumnFirst"))
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
GridBuildingAllocator::SetBuildingAttribute (std::string n, const AttributeValue &v)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_buildingFactory.Set (n, v);
|
||||
}
|
||||
|
||||
BuildingContainer
|
||||
GridBuildingAllocator::Create (uint32_t n) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
PushAttributes ();
|
||||
BuildingContainer bc;
|
||||
uint32_t limit = n + m_current;
|
||||
for (; m_current < limit; ++m_current)
|
||||
{
|
||||
Vector lowerLeft = m_lowerLeftPositionAllocator->GetNext ();
|
||||
Vector upperRight = m_upperRightPositionAllocator->GetNext ();
|
||||
Box box (lowerLeft.x, upperRight.x, lowerLeft.y, upperRight.y, 0, m_height);
|
||||
NS_LOG_LOGIC ("new building : " << box);
|
||||
BoxValue boxValue (box);
|
||||
m_buildingFactory.Set ("Boundaries", boxValue);
|
||||
Ptr<Building> b = m_buildingFactory.Create<Building> ();
|
||||
bc.Add (b);
|
||||
}
|
||||
return bc;
|
||||
}
|
||||
|
||||
void
|
||||
GridBuildingAllocator::PushAttributes () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_lowerLeftPositionAllocator->SetMinX (m_xMin);
|
||||
m_upperRightPositionAllocator->SetMinX (m_xMin + m_lengthX);
|
||||
m_lowerLeftPositionAllocator->SetDeltaX (m_lengthX + m_deltaX);
|
||||
m_upperRightPositionAllocator->SetDeltaX (m_lengthX + m_deltaX);
|
||||
|
||||
m_lowerLeftPositionAllocator->SetMinY (m_yMin);
|
||||
m_upperRightPositionAllocator->SetMinY (m_yMin + m_lengthY);
|
||||
m_lowerLeftPositionAllocator->SetDeltaY (m_lengthY + m_deltaY);
|
||||
m_upperRightPositionAllocator->SetDeltaY (m_lengthY + m_deltaY);
|
||||
|
||||
m_lowerLeftPositionAllocator->SetLayoutType (m_layoutType);
|
||||
m_upperRightPositionAllocator->SetLayoutType (m_layoutType);
|
||||
|
||||
m_lowerLeftPositionAllocator->SetN (m_n);
|
||||
m_upperRightPositionAllocator->SetN (m_n);
|
||||
}
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,93 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2007 INRIA
|
||||
* Copyright (C) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es> (took position-allocator and turned it into building-allocator)
|
||||
*/
|
||||
#ifndef BUILDING_ALLOCATOR_H
|
||||
#define BUILDING_ALLOCATOR_H
|
||||
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/object-factory.h"
|
||||
#include "ns3/random-variable.h"
|
||||
#include "ns3/vector.h"
|
||||
#include "ns3/building-container.h"
|
||||
#include "ns3/position-allocator.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Building;
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup buildings
|
||||
* \brief Allocate buildings on a rectangular 2d grid.
|
||||
*
|
||||
* This class allows to create a set of buildings positioned on a
|
||||
* rectangular 2D grid. Under the hood, this class uses two instances
|
||||
* of GridPositionAllocator.
|
||||
*/
|
||||
class GridBuildingAllocator : public Object
|
||||
{
|
||||
public:
|
||||
GridBuildingAllocator ();
|
||||
virtual ~GridBuildingAllocator ();
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
/**
|
||||
* Set an attribute to be used for each new building to be created
|
||||
*
|
||||
* \param n attribute name
|
||||
* \param v attribute value
|
||||
*/
|
||||
void SetBuildingAttribute (std::string n, const AttributeValue &v);
|
||||
|
||||
/**
|
||||
* Create a set of buildings allocated on a grid
|
||||
*
|
||||
* \param n the number of buildings to create
|
||||
*
|
||||
* \return the BuildingContainer that contains the newly created buildings
|
||||
*/
|
||||
BuildingContainer Create (uint32_t n) const;
|
||||
|
||||
private:
|
||||
|
||||
void PushAttributes () const;
|
||||
mutable uint32_t m_current;
|
||||
enum GridPositionAllocator::LayoutType m_layoutType;
|
||||
double m_xMin;
|
||||
double m_yMin;
|
||||
uint32_t m_n;
|
||||
double m_lengthX;
|
||||
double m_lengthY;
|
||||
double m_deltaX;
|
||||
double m_deltaY;
|
||||
double m_height;
|
||||
|
||||
mutable ObjectFactory m_buildingFactory;
|
||||
Ptr<GridPositionAllocator> m_lowerLeftPositionAllocator;
|
||||
Ptr<GridPositionAllocator> m_upperRightPositionAllocator;
|
||||
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* BUILDING_ALLOCATOR_H */
|
||||
@@ -0,0 +1,102 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2008 INRIA
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> (original node-container.cc)
|
||||
* Nicola Baldo (wrote building-container.cc based on node-container.cc)
|
||||
*/
|
||||
#include "building-container.h"
|
||||
#include "ns3/building-list.h"
|
||||
#include "ns3/names.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
BuildingContainer::BuildingContainer ()
|
||||
{
|
||||
}
|
||||
|
||||
BuildingContainer::BuildingContainer (Ptr<Building> building)
|
||||
{
|
||||
m_buildings.push_back (building);
|
||||
}
|
||||
BuildingContainer::BuildingContainer (std::string buildingName)
|
||||
{
|
||||
Ptr<Building> building = Names::Find<Building> (buildingName);
|
||||
m_buildings.push_back (building);
|
||||
}
|
||||
|
||||
BuildingContainer::Iterator
|
||||
BuildingContainer::Begin (void) const
|
||||
{
|
||||
return m_buildings.begin ();
|
||||
}
|
||||
BuildingContainer::Iterator
|
||||
BuildingContainer::End (void) const
|
||||
{
|
||||
return m_buildings.end ();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
BuildingContainer::GetN (void) const
|
||||
{
|
||||
return m_buildings.size ();
|
||||
}
|
||||
Ptr<Building>
|
||||
BuildingContainer::Get (uint32_t i) const
|
||||
{
|
||||
return m_buildings[i];
|
||||
}
|
||||
void
|
||||
BuildingContainer::Create (uint32_t n)
|
||||
{
|
||||
for (uint32_t i = 0; i < n; i++)
|
||||
{
|
||||
m_buildings.push_back (CreateObject<Building> ());
|
||||
}
|
||||
}
|
||||
void
|
||||
BuildingContainer::Add (BuildingContainer other)
|
||||
{
|
||||
for (Iterator i = other.Begin (); i != other.End (); i++)
|
||||
{
|
||||
m_buildings.push_back (*i);
|
||||
}
|
||||
}
|
||||
void
|
||||
BuildingContainer::Add (Ptr<Building> building)
|
||||
{
|
||||
m_buildings.push_back (building);
|
||||
}
|
||||
void
|
||||
BuildingContainer::Add (std::string buildingName)
|
||||
{
|
||||
Ptr<Building> building = Names::Find<Building> (buildingName);
|
||||
m_buildings.push_back (building);
|
||||
}
|
||||
|
||||
BuildingContainer
|
||||
BuildingContainer::GetGlobal (void)
|
||||
{
|
||||
BuildingContainer c;
|
||||
for (BuildingList::Iterator i = BuildingList::Begin (); i != BuildingList::End (); ++i)
|
||||
{
|
||||
c.Add (*i);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,208 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2008 INRIA
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> (original node-container.h)
|
||||
* Nicola Baldo (wrote building-container.h based on node-container.h)
|
||||
*/
|
||||
#ifndef BUILDING_CONTAINER_H
|
||||
#define BUILDING_CONTAINER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
#include <ns3/building.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \brief keep track of a set of building pointers.
|
||||
*
|
||||
* Some ns-3 helpers operate on more than one building at a time. For example
|
||||
* a PositionAllocator may want to position nodes on a set of buildings.
|
||||
* The helper methods will then usually take a BuildingContainer as a
|
||||
* parameter. BuildingContainers hold the multiple Ptr<Building> which are used
|
||||
* to refer to the buildings.
|
||||
*/
|
||||
class BuildingContainer
|
||||
{
|
||||
public:
|
||||
typedef std::vector<Ptr<Building> >::const_iterator Iterator;
|
||||
|
||||
/**
|
||||
* Create an empty BuildingContainer.
|
||||
*/
|
||||
BuildingContainer ();
|
||||
|
||||
/**
|
||||
* Create a BuildingContainer with exactly one building which has been previously
|
||||
* instantiated. The single Building is specified by a smart pointer.
|
||||
*
|
||||
* \param building The Ptr<Building> to add to the container.
|
||||
*/
|
||||
BuildingContainer (Ptr<Building> building);
|
||||
|
||||
/**
|
||||
* Create a BuildingContainer with exactly one building which has been previously
|
||||
* instantiated and assigned a name using the Object Name Service. This
|
||||
* Building is then specified by its assigned name.
|
||||
*
|
||||
* \param buildingName The name of the Building Object to add to the container.
|
||||
*/
|
||||
BuildingContainer (std::string buildingName);
|
||||
|
||||
/**
|
||||
* \brief Get an iterator which refers to the first Building in the
|
||||
* container.
|
||||
*
|
||||
* Buildings can be retrieved from the container in two ways. First,
|
||||
* directly by an index into the container, and second, using an iterator.
|
||||
* This method is used in the iterator method and is typically used in a
|
||||
* for-loop to run through the Buildings
|
||||
*
|
||||
* \code
|
||||
* BuildingContainer::Iterator i;
|
||||
* for (i = container.Begin (); i != container.End (); ++i)
|
||||
* {
|
||||
* (*i)->method (); // some Building method
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* \returns an iterator which refers to the first Building in the container.
|
||||
*/
|
||||
Iterator Begin (void) const;
|
||||
|
||||
/**
|
||||
* \brief Get an iterator which indicates past-the-last Building in the
|
||||
* container.
|
||||
*
|
||||
* Buildings can be retrieved from the container in two ways. First,
|
||||
* directly by an index into the container, and second, using an iterator.
|
||||
* This method is used in the iterator method and is typically used in a
|
||||
* for-loop to run through the Buildings
|
||||
*
|
||||
* \code
|
||||
* BuildingContainer::Iterator i;
|
||||
* for (i = container.Begin (); i != container.End (); ++i)
|
||||
* {
|
||||
* (*i)->method (); // some Building method
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* \returns an iterator which indicates an ending condition for a loop.
|
||||
*/
|
||||
Iterator End (void) const;
|
||||
|
||||
/**
|
||||
* \brief Get the number of Ptr<Building> stored in this container.
|
||||
*
|
||||
* Buildings can be retrieved from the container in two ways. First,
|
||||
* directly by an index into the container, and second, using an iterator.
|
||||
* This method is used in the direct method and is typically used to
|
||||
* define an ending condition in a for-loop that runs through the stored
|
||||
* Buildings
|
||||
*
|
||||
* \code
|
||||
* uint32_t nBuildings = container.GetN ();
|
||||
* for (uint32_t i = 0 i < nBuildings; ++i)
|
||||
* {
|
||||
* Ptr<Building> p = container.Get (i)
|
||||
* i->method (); // some Building method
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* \returns the number of Ptr<Building> stored in this container.
|
||||
*/
|
||||
uint32_t GetN (void) const;
|
||||
|
||||
/**
|
||||
* \brief Get the Ptr<Building> stored in this container at a given
|
||||
* index.
|
||||
*
|
||||
* Buildings can be retrieved from the container in two ways. First,
|
||||
* directly by an index into the container, and second, using an iterator.
|
||||
* This method is used in the direct method and is used to retrieve the
|
||||
* indexed Ptr<Appliation>.
|
||||
*
|
||||
* \code
|
||||
* uint32_t nBuildings = container.GetN ();
|
||||
* for (uint32_t i = 0 i < nBuildings; ++i)
|
||||
* {
|
||||
* Ptr<Building> p = container.Get (i)
|
||||
* i->method (); // some Building method
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* \param i the index of the requested building pointer.
|
||||
* \returns the requested building pointer.
|
||||
*/
|
||||
Ptr<Building> Get (uint32_t i) const;
|
||||
|
||||
/**
|
||||
* \brief Create n buildings and append pointers to them to the end of this
|
||||
* BuildingContainer.
|
||||
*
|
||||
* Buildings are at the heart of any ns-3 simulation. One of the first tasks that
|
||||
* any simulation needs to do is to create a number of buildings. This method
|
||||
* automates that task.
|
||||
*
|
||||
* \param n The number of Buildings to create
|
||||
*/
|
||||
void Create (uint32_t n);
|
||||
|
||||
/**
|
||||
* \brief Append the contents of another BuildingContainer to the end of
|
||||
* this container.
|
||||
*
|
||||
* \param other The BuildingContainer to append.
|
||||
*/
|
||||
void Add (BuildingContainer other);
|
||||
|
||||
/**
|
||||
* \brief Append a single Ptr<Building> to this container.
|
||||
*
|
||||
* \param building The Ptr<Building> to append.
|
||||
*/
|
||||
void Add (Ptr<Building> building);
|
||||
|
||||
/**
|
||||
* \brief Append to this container the single Ptr<Building> referred to
|
||||
* via its object name service registered name.
|
||||
*
|
||||
* \param buildingName The name of the Building Object to add to the container.
|
||||
*/
|
||||
void Add (std::string buildingName);
|
||||
|
||||
/**
|
||||
* \brief Create a BuildingContainer that contains a list of _all_ buildings
|
||||
* stored in the ns3::BuildingList.
|
||||
*
|
||||
* Whenever a Building is created, a Ptr<Building> is added to a global list of all
|
||||
* buildings in the system. It is sometimes useful to be able to get to all
|
||||
* buildings in one place. This method creates a BuildingContainer that is
|
||||
* initialized to contain all of the simulation buildings,
|
||||
*
|
||||
* \returns a BuildingContainer which contains a list of all Buildings.
|
||||
*/
|
||||
static BuildingContainer GetGlobal (void);
|
||||
|
||||
private:
|
||||
std::vector<Ptr<Building> > m_buildings;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* BUILDING_CONTAINER_H */
|
||||
@@ -0,0 +1,270 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
#include "building-position-allocator.h"
|
||||
#include "ns3/buildings-mobility-model.h"
|
||||
#include "ns3/buildings-helper.h"
|
||||
#include "ns3/random-variable.h"
|
||||
#include "ns3/double.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/enum.h"
|
||||
#include "ns3/boolean.h"
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/box.h"
|
||||
#include "ns3/building.h"
|
||||
#include <cmath>
|
||||
|
||||
#include "ns3/building-list.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("BuildingPositionAllocator");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (RandomBuildingPositionAllocator);
|
||||
|
||||
|
||||
RandomBuildingPositionAllocator::RandomBuildingPositionAllocator ()
|
||||
{
|
||||
}
|
||||
|
||||
TypeId
|
||||
RandomBuildingPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RandomBuildingPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.AddConstructor<RandomBuildingPositionAllocator> ()
|
||||
.AddAttribute ("WithReplacement",
|
||||
"If true, the building will be randomly selected with replacement. "
|
||||
"If false, no replacement will occur, until the list of buildings "
|
||||
"to select becomes empty, at which point it will be filled again "
|
||||
"with the list of all buildings.",
|
||||
BooleanValue (false),
|
||||
MakeBooleanAccessor (&RandomBuildingPositionAllocator::m_withReplacement),
|
||||
MakeBooleanChecker ());
|
||||
return tid;
|
||||
}
|
||||
|
||||
Vector
|
||||
RandomBuildingPositionAllocator::GetNext () const
|
||||
{
|
||||
UniformVariable rand;
|
||||
NS_ASSERT_MSG (BuildingList::GetNBuildings () > 0, "no building found");
|
||||
Ptr<Building> b;
|
||||
if (m_withReplacement)
|
||||
{
|
||||
uint32_t n = rand.GetInteger (0, BuildingList::GetNBuildings () - 1);
|
||||
b = BuildingList::GetBuilding (n);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_buildingListWithoutReplacement.empty ())
|
||||
{
|
||||
for (BuildingList::Iterator bit = BuildingList::Begin (); bit != BuildingList::End (); ++bit)
|
||||
{
|
||||
m_buildingListWithoutReplacement.push_back (*bit);
|
||||
}
|
||||
}
|
||||
uint32_t n = rand.GetInteger (0, m_buildingListWithoutReplacement.size () - 1);
|
||||
b = m_buildingListWithoutReplacement.at (n);
|
||||
m_buildingListWithoutReplacement.erase (m_buildingListWithoutReplacement.begin () + n);
|
||||
}
|
||||
|
||||
Ptr<RandomBoxPositionAllocator> pa = CreateObject<RandomBoxPositionAllocator> ();
|
||||
UniformVariable v;
|
||||
BoxValue bv;
|
||||
b->GetAttribute ("Boundaries", bv);
|
||||
double x = v.GetValue (bv.Get ().xMin, bv.Get ().xMax);
|
||||
double y = v.GetValue (bv.Get ().yMin, bv.Get ().yMax);
|
||||
double z = v.GetValue (bv.Get ().zMin, bv.Get ().zMax);
|
||||
return Vector (x, y, z);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (RandomRoomPositionAllocator);
|
||||
|
||||
|
||||
RandomRoomPositionAllocator::RandomRoomPositionAllocator ()
|
||||
{
|
||||
}
|
||||
|
||||
TypeId
|
||||
RandomRoomPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RandomRoomPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.AddConstructor<RandomRoomPositionAllocator> ();
|
||||
return tid;
|
||||
}
|
||||
|
||||
Vector
|
||||
RandomRoomPositionAllocator::GetNext () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
UniformVariable rand;
|
||||
NS_ASSERT_MSG (BuildingList::GetNBuildings () > 0, "no building found");
|
||||
|
||||
if (m_roomListWithoutReplacement.empty ())
|
||||
{
|
||||
for (BuildingList::Iterator bit = BuildingList::Begin (); bit != BuildingList::End (); ++bit)
|
||||
{
|
||||
NS_LOG_LOGIC ("building " << (*bit)->GetId ());
|
||||
for (uint32_t rx = 1; rx <= (*bit)->GetNRoomsX (); ++rx)
|
||||
{
|
||||
for (uint32_t ry = 1; ry <= (*bit)->GetNRoomsY (); ++ry)
|
||||
{
|
||||
for (uint32_t f = 1; f <= (*bit)->GetNFloors (); ++f)
|
||||
{
|
||||
RoomInfo i;
|
||||
i.roomx = rx;
|
||||
i.roomy = ry;
|
||||
i.floor = f;
|
||||
i.b = *bit;
|
||||
NS_LOG_LOGIC ("adding room (" << rx << ", " << ry << ", " << f << ")");
|
||||
m_roomListWithoutReplacement.push_back (i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
uint32_t n = rand.GetInteger (0,m_roomListWithoutReplacement.size () - 1);
|
||||
RoomInfo r = m_roomListWithoutReplacement.at (n);
|
||||
m_roomListWithoutReplacement.erase (m_roomListWithoutReplacement.begin () + n);
|
||||
NS_LOG_LOGIC ("considering building " << r.b->GetId () << " room (" << r.roomx << ", " << r.roomy << ", " << r.floor << ")");
|
||||
|
||||
Ptr<RandomBoxPositionAllocator> pa = CreateObject<RandomBoxPositionAllocator> ();
|
||||
UniformVariable v;
|
||||
BoxValue bv;
|
||||
r.b->GetAttribute ("Boundaries", bv);
|
||||
Box box = bv.Get ();
|
||||
double rdx = (box.xMax - box.xMin) / r.b->GetNRoomsX ();
|
||||
double rdy = (box.yMax - box.yMin) / r.b->GetNRoomsY ();
|
||||
double rdz = (box.zMax - box.zMin) / r.b->GetNFloors ();
|
||||
double x1 = box.xMin + rdx * (r.roomx - 1);
|
||||
double x2 = box.xMin + rdx * r.roomx;
|
||||
double y1 = box.yMin + rdy * (r.roomy -1);
|
||||
double y2 = box.yMin + rdy * r.roomy;
|
||||
double z1 = box.zMin + rdz * (r.floor - 1);
|
||||
double z2 = box.zMin + rdz * r.floor;
|
||||
NS_LOG_LOGIC ("randomly allocating position in "
|
||||
<< " (" << x1 << "," << x2 << ") "
|
||||
<< "x (" << y1 << "," << y2 << ") "
|
||||
<< "x (" << z1 << "," << z2 << ") ");
|
||||
|
||||
double x = v.GetValue (x1, x2);
|
||||
double y = v.GetValue (y1, y2);
|
||||
double z = v.GetValue (z1, z2);
|
||||
|
||||
return Vector (x, y, z);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (SameRoomPositionAllocator);
|
||||
|
||||
SameRoomPositionAllocator::SameRoomPositionAllocator ()
|
||||
{
|
||||
NS_FATAL_ERROR (" Constructor \"SameRoomPositionAllocator ()\" should not be used");
|
||||
}
|
||||
|
||||
|
||||
SameRoomPositionAllocator::SameRoomPositionAllocator (NodeContainer c)
|
||||
: m_nodes (c)
|
||||
{
|
||||
m_nodeIt = m_nodes.Begin ();
|
||||
// this is needed to make sure the building models associated with c have been initialized
|
||||
for (NodeContainer::Iterator it = m_nodes.Begin (); it != m_nodes.End (); ++it)
|
||||
{
|
||||
Ptr<MobilityModel> mm = (*it)->GetObject<MobilityModel> ();
|
||||
NS_ASSERT_MSG (mm, "no mobility model aggregated to this node");
|
||||
Ptr<BuildingsMobilityModel> bmm = DynamicCast<BuildingsMobilityModel> (mm);
|
||||
NS_ASSERT_MSG (bmm, "mobility model aggregated to this node is not a BuildingsMobilityModel");
|
||||
BuildingsHelper::MakeConsistent (bmm);
|
||||
}
|
||||
}
|
||||
|
||||
TypeId
|
||||
SameRoomPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::SameRoomPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.AddConstructor<SameRoomPositionAllocator> ();
|
||||
return tid;
|
||||
}
|
||||
|
||||
Vector
|
||||
SameRoomPositionAllocator::GetNext () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
UniformVariable rand;
|
||||
if (m_nodeIt == m_nodes.End ())
|
||||
{
|
||||
m_nodeIt = m_nodes.Begin ();
|
||||
}
|
||||
|
||||
NS_ASSERT_MSG (m_nodeIt != m_nodes.End (), "no node in container");
|
||||
|
||||
NS_LOG_LOGIC ("considering node " << (*m_nodeIt)->GetId ());
|
||||
Ptr<MobilityModel> mm = (*m_nodeIt)->GetObject<MobilityModel> ();
|
||||
NS_ASSERT_MSG (mm, "no mobility model aggregated to this node");
|
||||
Ptr<BuildingsMobilityModel> bmm = DynamicCast<BuildingsMobilityModel> (mm);
|
||||
NS_ASSERT_MSG (bmm, "mobility model aggregated to this node is not a BuildingsMobilityModel");
|
||||
|
||||
++m_nodeIt;
|
||||
uint32_t roomx = bmm->GetRoomNumberX ();
|
||||
uint32_t roomy = bmm->GetRoomNumberY ();
|
||||
uint32_t floor = bmm->GetFloorNumber ();
|
||||
NS_LOG_LOGIC ("considering building " << bmm->GetBuilding ()->GetId () << " room (" << roomx << ", " << roomy << ", " << floor << ")");
|
||||
|
||||
Ptr<Building> b = bmm->GetBuilding ();
|
||||
Ptr<RandomBoxPositionAllocator> pa = CreateObject<RandomBoxPositionAllocator> ();
|
||||
UniformVariable v;
|
||||
BoxValue bv;
|
||||
b->GetAttribute ("Boundaries", bv);
|
||||
Box box = bv.Get ();
|
||||
double rdx = (box.xMax - box.xMin) / b->GetNRoomsX ();
|
||||
double rdy = (box.yMax - box.yMin) / b->GetNRoomsY ();
|
||||
double rdz = (box.zMax - box.zMin) / b->GetNFloors ();
|
||||
double x1 = box.xMin + rdx * (roomx - 1);
|
||||
double x2 = box.xMin + rdx * roomx;
|
||||
double y1 = box.yMin + rdy * (roomy -1);
|
||||
double y2 = box.yMin + rdy * roomy;
|
||||
double z1 = box.zMin + rdz * (floor - 1);
|
||||
double z2 = box.zMin + rdz * floor;
|
||||
NS_LOG_LOGIC ("randomly allocating position in "
|
||||
<< " (" << x1 << "," << x2 << ") "
|
||||
<< "x (" << y1 << "," << y2 << ") "
|
||||
<< "x (" << z1 << "," << z2 << ") ");
|
||||
|
||||
double x = v.GetValue (x1, x2);
|
||||
double y = v.GetValue (y1, y2);
|
||||
double z = v.GetValue (z1, z2);
|
||||
|
||||
return Vector (x, y, z);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,112 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
#ifndef BUILDING_POSITION_ALLOCATOR_H
|
||||
#define BUILDING_POSITION_ALLOCATOR_H
|
||||
|
||||
#include <ns3/ptr.h>
|
||||
#include <ns3/position-allocator.h>
|
||||
#include <ns3/node-container.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Building;
|
||||
|
||||
|
||||
/**
|
||||
* Allocate each position by randomly chosing a building from the list
|
||||
* of all buildings, and then randomly chosing a position inside the building.
|
||||
*
|
||||
*/
|
||||
class RandomBuildingPositionAllocator : public PositionAllocator
|
||||
{
|
||||
public:
|
||||
RandomBuildingPositionAllocator ();
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
// inherited from PositionAllocator
|
||||
virtual Vector GetNext (void) const;
|
||||
|
||||
private:
|
||||
|
||||
bool m_withReplacement;
|
||||
mutable std::vector< Ptr<Building> > m_buildingListWithoutReplacement;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allocate each position by randomly chosing a room from the list
|
||||
* of all buildings, and then randomly chosing a position inside the room.
|
||||
* The selection of the room is always done without replacement.
|
||||
*
|
||||
*/
|
||||
class RandomRoomPositionAllocator : public PositionAllocator
|
||||
{
|
||||
public:
|
||||
RandomRoomPositionAllocator ();
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
// inherited from PositionAllocator
|
||||
virtual Vector GetNext (void) const;
|
||||
|
||||
private:
|
||||
|
||||
bool m_withReplacement;
|
||||
struct RoomInfo
|
||||
{
|
||||
Ptr<Building> b;
|
||||
uint32_t roomx;
|
||||
uint32_t roomy;
|
||||
uint32_t floor;
|
||||
};
|
||||
mutable std::vector<RoomInfo> m_roomListWithoutReplacement;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Walks a given NodeContainer sequentially, and for each node allocate a new
|
||||
* position randomly in the same room of that node
|
||||
*
|
||||
*/
|
||||
class SameRoomPositionAllocator : public PositionAllocator
|
||||
{
|
||||
public:
|
||||
SameRoomPositionAllocator ();
|
||||
SameRoomPositionAllocator (NodeContainer c);
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
// inherited from PositionAllocator
|
||||
virtual Vector GetNext (void) const;
|
||||
|
||||
private:
|
||||
|
||||
NodeContainer m_nodes;
|
||||
mutable NodeContainer::Iterator m_nodeIt;
|
||||
};
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* BUILDING_POSITION_ALLOCATOR_H */
|
||||
@@ -0,0 +1,80 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2012 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#include "buildings-helper.h"
|
||||
|
||||
#include <ns3/node-list.h>
|
||||
#include <ns3/building.h>
|
||||
#include <ns3/building-list.h>
|
||||
#include <ns3/mobility-model.h>
|
||||
#include <ns3/buildings-mobility-model.h>
|
||||
#include <ns3/abort.h>
|
||||
#include <ns3/log.h>
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("BuildingsHelper");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
void
|
||||
BuildingsHelper::MakeMobilityModelConsistent ()
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
for (NodeList::Iterator nit = NodeList::Begin (); nit != NodeList::End (); ++nit)
|
||||
{
|
||||
Ptr<MobilityModel> mm = (*nit)->GetObject<MobilityModel> ();
|
||||
if (mm != 0)
|
||||
{
|
||||
Ptr<BuildingsMobilityModel> bmm = DynamicCast<BuildingsMobilityModel> (mm);
|
||||
NS_ABORT_MSG_UNLESS (0 != bmm, "node " << (*nit)->GetId () << " has a MobilityModel but it is not a BuildingsMobilityModel");
|
||||
MakeConsistent (bmm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BuildingsHelper::MakeConsistent (Ptr<BuildingsMobilityModel> bmm)
|
||||
{
|
||||
bool found = false;
|
||||
for (BuildingList::Iterator bit = BuildingList::Begin (); bit != BuildingList::End (); ++bit)
|
||||
{
|
||||
NS_LOG_LOGIC ("checking building " << (*bit)->GetId () << " with boundaries " << (*bit)->GetBoundaries ());
|
||||
Vector pos = bmm->GetPosition ();
|
||||
if ((*bit)->IsInside (pos))
|
||||
{
|
||||
NS_LOG_LOGIC ("BuildingsMobilityModel " << bmm << " pos " << bmm->GetPosition () << " falls inside building " << (*bit)->GetId ());
|
||||
NS_ABORT_MSG_UNLESS (found == false, " BuildingsMobilityModel already inside another building!");
|
||||
found = true;
|
||||
uint16_t floor = (*bit)->GetFloor (pos);
|
||||
uint16_t roomX = (*bit)->GetRoomX (pos);
|
||||
uint16_t roomY = (*bit)->GetRoomY (pos);
|
||||
bmm->SetIndoor (*bit, floor, roomX, roomY);
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
NS_LOG_LOGIC ("BuildingsMobilityModel " << bmm << " pos " << bmm->GetPosition () << " is outdoor");
|
||||
bmm->SetOutdoor ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
|
||||
* Copyright (c) 2012 CTTC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@@ -15,50 +15,32 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Giuseppe Piro <g.piro@poliba.it>
|
||||
* Author: Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef SIMPLE_PACKET_SCHEDULER_H
|
||||
#define SIMPLE_PACKET_SCHEDULER_H
|
||||
#ifndef BUILDINGS_HELPER_H
|
||||
#define BUILDINGS_HELPER_H
|
||||
|
||||
|
||||
#include <ns3/nstime.h>
|
||||
#include <ns3/object.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <ns3/attribute.h>
|
||||
#include <ns3/object-factory.h>
|
||||
#include <ns3/node-container.h>
|
||||
#include <ns3/ptr.h>
|
||||
#include "packet-scheduler.h"
|
||||
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class BuildingsMobilityModel;
|
||||
|
||||
/**
|
||||
* \ingroup lte
|
||||
*
|
||||
* This class implements a simple packet scheduler
|
||||
*/
|
||||
class SimplePacketScheduler : public PacketScheduler
|
||||
class BuildingsHelper
|
||||
{
|
||||
|
||||
public:
|
||||
SimplePacketScheduler ();
|
||||
|
||||
/**
|
||||
* \brief Create a simple packet scheduler
|
||||
* \param enb the enb where the packet scheduler works
|
||||
*/
|
||||
SimplePacketScheduler (Ptr<EnbNetDevice> enb);
|
||||
virtual ~SimplePacketScheduler ();
|
||||
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
virtual void DoRunPacketScheduler (void);
|
||||
|
||||
|
||||
private:
|
||||
public:
|
||||
static void MakeMobilityModelConsistent ();
|
||||
static void MakeConsistent (Ptr<BuildingsMobilityModel> bmm);
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* SIMPLE_PACKET_SCHEDULER_H */
|
||||
#endif /* BUILDINGS_HELPER_H */
|
||||
@@ -0,0 +1,192 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Jaume Nin <jaume.nin@cttc,cat>
|
||||
* Based on BuildingList implemenation by Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
|
||||
*
|
||||
*/
|
||||
#include "building-list.h"
|
||||
#include "ns3/simulator.h"
|
||||
#include "ns3/object-vector.h"
|
||||
#include "ns3/config.h"
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/assert.h"
|
||||
#include "building-list.h"
|
||||
#include "building.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("BuildingList");
|
||||
|
||||
/**
|
||||
* \brief private implementation detail of the BuildingList API.
|
||||
*/
|
||||
class BuildingListPriv : public Object
|
||||
{
|
||||
public:
|
||||
static TypeId GetTypeId (void);
|
||||
BuildingListPriv ();
|
||||
~BuildingListPriv ();
|
||||
|
||||
uint32_t Add (Ptr<Building> building);
|
||||
BuildingList::Iterator Begin (void) const;
|
||||
BuildingList::Iterator End (void) const;
|
||||
Ptr<Building> GetBuilding (uint32_t n);
|
||||
uint32_t GetNBuildings (void);
|
||||
|
||||
static Ptr<BuildingListPriv> Get (void);
|
||||
|
||||
private:
|
||||
virtual void DoDispose (void);
|
||||
static Ptr<BuildingListPriv> *DoGet (void);
|
||||
static void Delete (void);
|
||||
std::vector<Ptr<Building> > m_buildings;
|
||||
};
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (BuildingListPriv);
|
||||
|
||||
TypeId
|
||||
BuildingListPriv::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BuildingListPriv")
|
||||
.SetParent<Object> ()
|
||||
.AddAttribute ("BuildingList", "The list of all buildings created during the simulation.",
|
||||
ObjectVectorValue (),
|
||||
MakeObjectVectorAccessor (&BuildingListPriv::m_buildings),
|
||||
MakeObjectVectorChecker<Building> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
Ptr<BuildingListPriv>
|
||||
BuildingListPriv::Get (void)
|
||||
{
|
||||
return *DoGet ();
|
||||
}
|
||||
Ptr<BuildingListPriv> *
|
||||
BuildingListPriv::DoGet (void)
|
||||
{
|
||||
static Ptr<BuildingListPriv> ptr = 0;
|
||||
if (ptr == 0)
|
||||
{
|
||||
ptr = CreateObject<BuildingListPriv> ();
|
||||
Config::RegisterRootNamespaceObject (ptr);
|
||||
Simulator::ScheduleDestroy (&BuildingListPriv::Delete);
|
||||
}
|
||||
return &ptr;
|
||||
}
|
||||
void
|
||||
BuildingListPriv::Delete (void)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
Config::UnregisterRootNamespaceObject (Get ());
|
||||
(*DoGet ()) = 0;
|
||||
}
|
||||
|
||||
|
||||
BuildingListPriv::BuildingListPriv ()
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
}
|
||||
BuildingListPriv::~BuildingListPriv ()
|
||||
{
|
||||
}
|
||||
void
|
||||
BuildingListPriv::DoDispose (void)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
for (std::vector<Ptr<Building> >::iterator i = m_buildings.begin ();
|
||||
i != m_buildings.end (); i++)
|
||||
{
|
||||
Ptr<Building> building = *i;
|
||||
building->Dispose ();
|
||||
*i = 0;
|
||||
}
|
||||
m_buildings.erase (m_buildings.begin (), m_buildings.end ());
|
||||
Object::DoDispose ();
|
||||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
BuildingListPriv::Add (Ptr<Building> building)
|
||||
{
|
||||
uint32_t index = m_buildings.size ();
|
||||
m_buildings.push_back (building);
|
||||
Simulator::ScheduleWithContext (index, TimeStep (0), &Building::Start, building);
|
||||
return index;
|
||||
|
||||
}
|
||||
BuildingList::Iterator
|
||||
BuildingListPriv::Begin (void) const
|
||||
{
|
||||
return m_buildings.begin ();
|
||||
}
|
||||
BuildingList::Iterator
|
||||
BuildingListPriv::End (void) const
|
||||
{
|
||||
return m_buildings.end ();
|
||||
}
|
||||
uint32_t
|
||||
BuildingListPriv::GetNBuildings (void)
|
||||
{
|
||||
return m_buildings.size ();
|
||||
}
|
||||
|
||||
Ptr<Building>
|
||||
BuildingListPriv::GetBuilding (uint32_t n)
|
||||
{
|
||||
NS_ASSERT_MSG (n < m_buildings.size (), "Building index " << n <<
|
||||
" is out of range (only have " << m_buildings.size () << " buildings).");
|
||||
return m_buildings.at (n);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The implementation of the public static-based API
|
||||
* which calls into the private implementation through
|
||||
* the simulation singleton.
|
||||
*/
|
||||
namespace ns3 {
|
||||
|
||||
uint32_t
|
||||
BuildingList::Add (Ptr<Building> building)
|
||||
{
|
||||
return BuildingListPriv::Get ()->Add (building);
|
||||
}
|
||||
BuildingList::Iterator
|
||||
BuildingList::Begin (void)
|
||||
{
|
||||
return BuildingListPriv::Get ()->Begin ();
|
||||
}
|
||||
BuildingList::Iterator
|
||||
BuildingList::End (void)
|
||||
{
|
||||
return BuildingListPriv::Get ()->End ();
|
||||
}
|
||||
Ptr<Building>
|
||||
BuildingList::GetBuilding (uint32_t n)
|
||||
{
|
||||
return BuildingListPriv::Get ()->GetBuilding (n);
|
||||
}
|
||||
uint32_t
|
||||
BuildingList::GetNBuildings (void)
|
||||
{
|
||||
return BuildingListPriv::Get ()->GetNBuildings ();
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,71 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Jaume Nin <jaume.nin@cttc,cat>
|
||||
* Based on NodeList implementation by Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BUILDING_LIST_H_
|
||||
#define BUILDING_LIST_H_
|
||||
|
||||
#include <vector>
|
||||
#include "ns3/ptr.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class Building;
|
||||
|
||||
class BuildingList
|
||||
{
|
||||
public:
|
||||
typedef std::vector< Ptr<Building> >::const_iterator Iterator;
|
||||
|
||||
/**
|
||||
* \param building building to add
|
||||
* \returns index of building in list.
|
||||
*
|
||||
* This method is called automatically from Building::Building so
|
||||
* the user has little reason to call it himself.
|
||||
*/
|
||||
static uint32_t Add (Ptr<Building> building);
|
||||
/**
|
||||
* \returns a C++ iterator located at the beginning of this
|
||||
* list.
|
||||
*/
|
||||
static Iterator Begin (void);
|
||||
/**
|
||||
* \returns a C++ iterator located at the end of this
|
||||
* list.
|
||||
*/
|
||||
static Iterator End (void);
|
||||
/**
|
||||
* \param n index of requested building.
|
||||
* \returns the Building associated to index n.
|
||||
*/
|
||||
static Ptr<Building> GetBuilding (uint32_t n);
|
||||
/**
|
||||
* \returns the number of buildings currently in the list.
|
||||
*/
|
||||
static uint32_t GetNBuildings (void);
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* BUILDING_LIST_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Authors: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
* Nicola Baldo <nbaldo@cttc.es>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "building.h"
|
||||
#include "building-list.h"
|
||||
|
||||
#include <ns3/enum.h>
|
||||
#include <ns3/uinteger.h>
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/assert.h>
|
||||
#include <math.h>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Building");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (Building);
|
||||
|
||||
TypeId
|
||||
Building::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::Building")
|
||||
.SetParent<Object> ()
|
||||
.AddConstructor<Building> ()
|
||||
.AddAttribute ("NRoomsX", "The number of rooms in the X axis.",
|
||||
UintegerValue (1),
|
||||
MakeUintegerAccessor (&Building::GetNRoomsX, &Building::SetNRoomsX),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
.AddAttribute ("NRoomsY", "The number of rooms in the Y axis.",
|
||||
UintegerValue (1),
|
||||
MakeUintegerAccessor (&Building::GetNRoomsY, &Building::SetNRoomsY),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
.AddAttribute ("NFloors", "The number of floors of this building.",
|
||||
UintegerValue (1),
|
||||
MakeUintegerAccessor (&Building::GetNFloors, &Building::SetNFloors),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
.AddAttribute ("Id", "The id (unique integer) of this Building.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&Building::GetId),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
.AddAttribute ("Boundaries", "The boundaries of this Building as a value of type ns3::Box",
|
||||
BoxValue (Box ()),
|
||||
MakeBoxAccessor (&Building::GetBoundaries, &Building::SetBoundaries),
|
||||
MakeBoxChecker ())
|
||||
.AddAttribute ("Type",
|
||||
"The type of building",
|
||||
EnumValue (Building::Residential),
|
||||
MakeEnumAccessor (&Building::GetBuildingType, &Building::SetBuildingType),
|
||||
MakeEnumChecker (Building::Residential, "Residential",
|
||||
Building::Office, "Office",
|
||||
Building::Commercial, "Commercial"))
|
||||
.AddAttribute ("ExternalWallsType",
|
||||
"The type of material of which the external walls are made",
|
||||
EnumValue (Building::ConcreteWithWindows),
|
||||
MakeEnumAccessor (&Building::GetExtWallsType, &Building::SetExtWallsType),
|
||||
MakeEnumChecker (Building::Wood, "Wood",
|
||||
Building::ConcreteWithWindows, "ConcreteWithWindows",
|
||||
Building::ConcreteWithoutWindows, "ConcreteWithoutWindows",
|
||||
Building::StoneBlocks, "StoneBlocks"))
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
Building::Building (double xMin,
|
||||
double xMax,
|
||||
double yMin,
|
||||
double yMax,
|
||||
double zMin,
|
||||
double zMax)
|
||||
{
|
||||
NS_FATAL_ERROR (std::endl << "this function is not supported any more:" << std::endl
|
||||
<< " Building::Building (double xMin, double xMax, double yMin, " << std::endl
|
||||
<< " double yMax, double zMin, double zMax)\n" << std::endl
|
||||
<< "so you can't do any more stuff like:" << std::endl
|
||||
<< "Ptr<Building> b = CreateObject<Building> ("
|
||||
<< xMin << ", "
|
||||
<< xMax << ", "
|
||||
<< yMin << ", "
|
||||
<< yMax << ", "
|
||||
<< zMin << ", "
|
||||
<< zMax << ")\n" << std::endl
|
||||
<< "Please use instead something like this:" << std::endl
|
||||
<< " Ptr<Building> b = CreateObject<Building> ();" << std::endl
|
||||
<< " b->SetBoundaries (Box ("
|
||||
<< xMin << ", "
|
||||
<< xMax << ", "
|
||||
<< yMin << ", "
|
||||
<< yMax << ", "
|
||||
<< zMin << ", "
|
||||
<< zMax << "));" << std::endl <<std::endl);
|
||||
}
|
||||
|
||||
|
||||
Building::Building ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_buildingId = BuildingList::Add(this);
|
||||
}
|
||||
|
||||
Building::~Building ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
Building::DoDispose ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
Building::GetId (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_buildingId;
|
||||
}
|
||||
|
||||
void
|
||||
Building::SetBoundaries (Box boundaries)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << boundaries);
|
||||
m_buildingBounds = boundaries;
|
||||
}
|
||||
|
||||
void
|
||||
Building::SetBuildingType (Building::BuildingType_t t)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << t);
|
||||
m_buildingType = t;
|
||||
}
|
||||
|
||||
void
|
||||
Building::SetExtWallsType (Building::ExtWallsType_t t)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << t);
|
||||
m_externalWalls = t;
|
||||
}
|
||||
|
||||
void
|
||||
Building::SetNFloors (uint16_t nfloors)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << nfloors);
|
||||
m_floors = nfloors;
|
||||
}
|
||||
|
||||
void
|
||||
Building::SetNRoomsX (uint16_t nroomx)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << nroomx);
|
||||
m_roomsX = nroomx;
|
||||
}
|
||||
|
||||
void
|
||||
Building::SetNRoomsY (uint16_t nroomy)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << nroomy);
|
||||
m_roomsY = nroomy;
|
||||
}
|
||||
|
||||
Box
|
||||
Building::GetBoundaries () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_buildingBounds;
|
||||
}
|
||||
|
||||
Building::BuildingType_t
|
||||
Building::GetBuildingType () const
|
||||
{
|
||||
return (m_buildingType);
|
||||
}
|
||||
|
||||
Building::ExtWallsType_t
|
||||
Building::GetExtWallsType () const
|
||||
{
|
||||
return (m_externalWalls);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
Building::GetNFloors () const
|
||||
{
|
||||
return (m_floors);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
Building::GetNRoomsX () const
|
||||
{
|
||||
return (m_roomsX);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
Building::GetNRoomsY () const
|
||||
{
|
||||
return (m_roomsY);
|
||||
}
|
||||
|
||||
bool
|
||||
Building::IsInside (Vector position) const
|
||||
{
|
||||
return m_buildingBounds.IsInside (position);
|
||||
}
|
||||
|
||||
|
||||
uint16_t
|
||||
Building::GetRoomX (Vector position) const
|
||||
{
|
||||
NS_ASSERT (IsInside (position));
|
||||
uint16_t n;
|
||||
|
||||
if (position.x == m_buildingBounds.xMax)
|
||||
{
|
||||
n = m_roomsX;
|
||||
}
|
||||
else
|
||||
{
|
||||
double xLength = m_buildingBounds.xMax - m_buildingBounds.xMin;
|
||||
double x = position.x - m_buildingBounds.xMin;
|
||||
n = floor (m_roomsX * x/xLength) + 1;
|
||||
NS_LOG_LOGIC ("xLength=" << xLength << ", x=" << x << ", m_roomsX=" << m_roomsX);
|
||||
}
|
||||
NS_LOG_LOGIC ("RoomX: " << n);
|
||||
return n;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
Building::GetRoomY (Vector position) const
|
||||
{
|
||||
NS_ASSERT (IsInside (position));
|
||||
uint16_t n;
|
||||
|
||||
if (position.y == m_buildingBounds.yMax)
|
||||
{
|
||||
n = m_roomsY;
|
||||
}
|
||||
else
|
||||
{
|
||||
double yLength = m_buildingBounds.yMax - m_buildingBounds.yMin;
|
||||
double y = position.y - m_buildingBounds.yMin;
|
||||
n = floor (m_roomsY * y/yLength) + 1;
|
||||
NS_LOG_LOGIC ("yLength=" << yLength << ", y=" << y << ", m_roomsY=" << m_roomsY);
|
||||
}
|
||||
NS_LOG_LOGIC ("RoomY: " << n);
|
||||
return n;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
Building::GetFloor (Vector position) const
|
||||
{
|
||||
NS_ASSERT (IsInside (position));
|
||||
uint16_t n;
|
||||
|
||||
if (position.z == m_buildingBounds.zMax)
|
||||
{
|
||||
n = m_floors;
|
||||
}
|
||||
else
|
||||
{
|
||||
double zLength = m_buildingBounds.zMax - m_buildingBounds.zMin;
|
||||
double z = position.z - m_buildingBounds.zMin;
|
||||
n = floor (m_floors * z/zLength) + 1;
|
||||
NS_LOG_LOGIC ("zLength=" << zLength << ", z=" << z << ", m_floors=" << m_floors);
|
||||
}
|
||||
NS_LOG_LOGIC ("floor: " << n);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,227 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
*
|
||||
*/
|
||||
#ifndef BUILDING_H
|
||||
#define BUILDING_H
|
||||
|
||||
#include <ns3/attribute.h>
|
||||
#include <ns3/attribute-helper.h>
|
||||
#include <ns3/vector.h>
|
||||
#include <ns3/box.h>
|
||||
#include <ns3/simple-ref-count.h>
|
||||
#include <ns3/object.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup mobility
|
||||
* \brief a 3d building block
|
||||
*/
|
||||
class Building : public Object
|
||||
{
|
||||
public:
|
||||
|
||||
// inherited from Object
|
||||
static TypeId GetTypeId (void);
|
||||
virtual void DoDispose ();
|
||||
|
||||
|
||||
enum BuildingType_t
|
||||
{
|
||||
Residential, Office, Commercial
|
||||
};
|
||||
enum ExtWallsType_t
|
||||
{
|
||||
Wood, ConcreteWithWindows, ConcreteWithoutWindows, StoneBlocks
|
||||
};
|
||||
|
||||
/**
|
||||
* Construct a simple building with 1 room and 1 floor
|
||||
*
|
||||
* \param xMin x coordinates of left boundary.
|
||||
* \param xMax x coordinates of right boundary.
|
||||
* \param yMin y coordinates of bottom boundary.
|
||||
* \param yMax y coordinates of top boundary.
|
||||
* \param zMin z coordinates of down boundary.
|
||||
* \param zMax z coordinates of up boundary.
|
||||
*
|
||||
*/
|
||||
Building (double xMin,
|
||||
double xMax,
|
||||
double yMin,
|
||||
double yMax,
|
||||
double zMin,
|
||||
double zMax);
|
||||
|
||||
/**
|
||||
* Create a zero-sized building located at coordinates (0.0,0.0,0.0)
|
||||
* and with 1 floors and 1 room.
|
||||
*/
|
||||
Building ();
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*
|
||||
*/
|
||||
virtual ~Building ();
|
||||
|
||||
/**
|
||||
* \return the unique id of this Building. This unique id happens to
|
||||
* be also the index of the Building into the BuildingList.
|
||||
*/
|
||||
uint32_t GetId (void) const;
|
||||
|
||||
/**
|
||||
* Set the boundaries of the building
|
||||
*
|
||||
* \param box the Box defining the boundaries of the building
|
||||
*/
|
||||
void SetBoundaries (Box box);
|
||||
|
||||
/**
|
||||
* \param t the type of building (i.e., Residential, Office, Commercial)
|
||||
*
|
||||
* This method allows to set building type (default is Residential)
|
||||
*/
|
||||
void SetBuildingType (Building::BuildingType_t t);
|
||||
|
||||
/**
|
||||
* \param t the type of external walls (i.e., Wood, ConcreteWithWindows,
|
||||
* ConcreteWithoutWindows and StoneBlocks), used for evaluating the loss
|
||||
* due to the penetration of external walls in outdoor <-> indoor comm.
|
||||
*
|
||||
* This method allows to set external walls type (default is Residential)
|
||||
*/
|
||||
void SetExtWallsType (Building::ExtWallsType_t t);
|
||||
|
||||
/**
|
||||
* \param nfloors the number of floors in the building
|
||||
*
|
||||
* This method allows to set the number of floors in the building
|
||||
* (default is 1)
|
||||
*/
|
||||
void SetNFloors (uint16_t nfloors);
|
||||
|
||||
/**
|
||||
* \param nroomx the number of rooms along the x axis
|
||||
*
|
||||
* This method allows to set the number of rooms along the x-axis
|
||||
*/
|
||||
void SetNRoomsX (uint16_t nroomx);
|
||||
|
||||
/**
|
||||
* \param nroomy the number of floors in the building
|
||||
*
|
||||
* This method allows to set the number of rooms along the y-axis
|
||||
*/
|
||||
void SetNRoomsY (uint16_t nroomy);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return the boundaries of the building
|
||||
*/
|
||||
Box GetBoundaries () const;
|
||||
|
||||
/**
|
||||
* \return the type of building
|
||||
*/
|
||||
BuildingType_t GetBuildingType () const;
|
||||
|
||||
/**
|
||||
* \return the type of external walls of the building
|
||||
*/
|
||||
ExtWallsType_t GetExtWallsType () const;
|
||||
|
||||
/**
|
||||
* \return the number of floors of the building
|
||||
*/
|
||||
uint16_t GetNFloors () const;
|
||||
|
||||
/**
|
||||
* \return the number of rooms along the x-axis of the building
|
||||
*/
|
||||
uint16_t GetNRoomsX () const;
|
||||
|
||||
/**
|
||||
* \return the number of rooms along the y-axis
|
||||
*/
|
||||
uint16_t GetNRoomsY () const;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* \param position some position
|
||||
*
|
||||
* \return true if the position fall inside the building, false otherwise
|
||||
*/
|
||||
bool IsInside (Vector position) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* \param position a position inside the building
|
||||
*
|
||||
* \return the number of the room along the X axis where the
|
||||
* position falls
|
||||
*/
|
||||
uint16_t GetRoomX (Vector position) const;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* \param position a position inside the building
|
||||
*
|
||||
* \return the number of the room along the Y axis where the
|
||||
* position falls
|
||||
*/
|
||||
uint16_t GetRoomY (Vector position) const;
|
||||
|
||||
/**
|
||||
*
|
||||
* \param position a position inside the building
|
||||
*
|
||||
* \return the floor where the position falls
|
||||
*/
|
||||
uint16_t GetFloor (Vector position) const;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Box m_buildingBounds;
|
||||
|
||||
/**
|
||||
* number of floors, must be greater than 0, and 1 means only one floor
|
||||
* (i.e., groundfloor)
|
||||
*/
|
||||
uint16_t m_floors;
|
||||
uint16_t m_roomsX;
|
||||
uint16_t m_roomsY;
|
||||
|
||||
uint32_t m_buildingId;
|
||||
BuildingType_t m_buildingType;
|
||||
ExtWallsType_t m_externalWalls;
|
||||
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* BUILDING_H */
|
||||
@@ -0,0 +1,155 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ns3/simulator.h>
|
||||
#include <ns3/position-allocator.h>
|
||||
#include <ns3/buildings-mobility-model.h>
|
||||
#include <ns3/pointer.h>
|
||||
#include <ns3/log.h>
|
||||
#include <ns3/assert.h>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("BuildingsMobilityModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (BuildingsMobilityModel);
|
||||
|
||||
TypeId
|
||||
BuildingsMobilityModel::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BuildingsMobilityModel")
|
||||
.SetParent<MobilityModel> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.AddConstructor<BuildingsMobilityModel> ();
|
||||
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
||||
BuildingsMobilityModel::BuildingsMobilityModel ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_indoor = false;
|
||||
m_nFloor = 1;
|
||||
m_roomX = 1;
|
||||
m_roomY = 1;
|
||||
}
|
||||
|
||||
void
|
||||
BuildingsMobilityModel::DoDispose (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
MobilityModel::DoDispose ();
|
||||
}
|
||||
|
||||
Vector
|
||||
BuildingsMobilityModel::DoGetPosition (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_helper.Update ();
|
||||
return m_helper.GetCurrentPosition ();
|
||||
}
|
||||
void
|
||||
BuildingsMobilityModel::DoSetPosition (const Vector &position)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_helper.SetPosition (position);
|
||||
}
|
||||
Vector
|
||||
BuildingsMobilityModel::DoGetVelocity (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_helper.GetVelocity ();
|
||||
}
|
||||
|
||||
bool
|
||||
BuildingsMobilityModel::IsIndoor (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_indoor);
|
||||
}
|
||||
|
||||
bool
|
||||
BuildingsMobilityModel::IsOutdoor (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (!m_indoor);
|
||||
}
|
||||
|
||||
void
|
||||
BuildingsMobilityModel::SetIndoor (Ptr<Building> building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_indoor = true;
|
||||
m_myBuilding = building;
|
||||
m_nFloor = nfloor;
|
||||
m_roomX = nroomx;
|
||||
m_roomY = nroomy;
|
||||
|
||||
NS_ASSERT_MSG (building->IsInside (m_helper.GetCurrentPosition ()), "Position of the node is outside of building bounds");
|
||||
NS_ASSERT (m_roomX > 0);
|
||||
NS_ASSERT (m_roomX <= building->GetNRoomsX ());
|
||||
NS_ASSERT (m_roomY > 0);
|
||||
NS_ASSERT (m_roomY <= building->GetNRoomsY ());
|
||||
NS_ASSERT (m_nFloor > 0);
|
||||
NS_ASSERT (m_nFloor <= building->GetNFloors ());
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BuildingsMobilityModel::SetOutdoor (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_indoor = false;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BuildingsMobilityModel::GetFloorNumber (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_nFloor);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BuildingsMobilityModel::GetRoomNumberX (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_roomX);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BuildingsMobilityModel::GetRoomNumberY (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_roomY);
|
||||
}
|
||||
|
||||
|
||||
Ptr<Building>
|
||||
BuildingsMobilityModel::GetBuilding ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return (m_myBuilding);
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
@@ -0,0 +1,127 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
*
|
||||
*/
|
||||
#ifndef BUILDINGS_MOBILITY_MODEL_H
|
||||
#define BUILDINGS_MOBILITY_MODEL_H
|
||||
|
||||
|
||||
|
||||
#include <ns3/mobility-model.h>
|
||||
#include <ns3/ptr.h>
|
||||
#include <ns3/object.h>
|
||||
#include <ns3/box.h>
|
||||
#include <map>
|
||||
#include <ns3/building.h>
|
||||
#include <ns3/constant-velocity-helper.h>
|
||||
|
||||
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup mobility
|
||||
* \brief Buildings mobility model
|
||||
*
|
||||
* This model implements the managment of scenarios where users might be
|
||||
* either indoor (e.g., houses, offices, etc.) and outdoor.
|
||||
*
|
||||
*/
|
||||
class BuildingsMobilityModel : public MobilityModel
|
||||
{
|
||||
public:
|
||||
static TypeId GetTypeId (void);
|
||||
BuildingsMobilityModel ();
|
||||
|
||||
/**
|
||||
*
|
||||
* \return true if the MobilityModel instance is indoor, false otherwise
|
||||
*/
|
||||
bool IsIndoor (void);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return true if the MobilityModel instance is outdoor, false otherwise
|
||||
*/
|
||||
bool IsOutdoor (void);
|
||||
|
||||
/**
|
||||
* Mark this MobilityModel instance as indoor
|
||||
*
|
||||
* \param building the building into which the MobilityModel instance is located
|
||||
* \param nfloor the floor number 1...nFloors at which the MobilityModel instance is located
|
||||
* \param nroomx the X room number 1...nRoomsX at which the MobilityModel instance is located
|
||||
* \param nroomy the Y room number 1...nRoomsY at which the MobilityModel instance is located
|
||||
*/
|
||||
void SetIndoor (Ptr<Building> building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy);
|
||||
|
||||
/**
|
||||
* Mark this MobilityModel instance as outdoor
|
||||
*
|
||||
*/
|
||||
void SetOutdoor ();
|
||||
|
||||
/**
|
||||
*
|
||||
* \return
|
||||
*/
|
||||
uint8_t GetFloorNumber (void);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return
|
||||
*/
|
||||
uint8_t GetRoomNumberX (void);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return
|
||||
*/
|
||||
uint8_t GetRoomNumberY (void);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return
|
||||
*/
|
||||
Ptr<Building> GetBuilding ();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
virtual void DoDispose (void);
|
||||
virtual Vector DoGetPosition (void) const;
|
||||
virtual void DoSetPosition (const Vector &position);
|
||||
virtual Vector DoGetVelocity (void) const;
|
||||
ConstantVelocityHelper m_helper;
|
||||
|
||||
Ptr<Building> m_myBuilding;
|
||||
bool m_indoor;
|
||||
uint8_t m_nFloor;
|
||||
uint8_t m_roomX;
|
||||
uint8_t m_roomY;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
#endif // BUILDINGS_MOBILITY_MODEL_H
|
||||
@@ -0,0 +1,218 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>,
|
||||
* Nicola Baldo <nbaldo@cttc.es>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ns3/propagation-loss-model.h"
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/mobility-model.h"
|
||||
#include "ns3/double.h"
|
||||
#include "ns3/pointer.h"
|
||||
#include <cmath>
|
||||
#include "buildings-propagation-loss-model.h"
|
||||
#include "ns3/buildings-mobility-model.h"
|
||||
#include "ns3/enum.h"
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("BuildingsPropagationLossModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (BuildingsPropagationLossModel);
|
||||
|
||||
|
||||
BuildingsPropagationLossModel::ShadowingLoss::ShadowingLoss ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BuildingsPropagationLossModel::ShadowingLoss::ShadowingLoss (double mean, double sigma, Ptr<MobilityModel> receiver)
|
||||
: m_receiver (receiver),
|
||||
m_randVariable (mean, sigma * sigma) // NormalVariable class wants mean and variance (sigma is a standard deviation)
|
||||
{
|
||||
m_shadowingValue = m_randVariable.GetValue ();
|
||||
NS_LOG_INFO (this << " New Shadowing: sigma " << sigma << " value " << m_shadowingValue);
|
||||
}
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::ShadowingLoss::GetLoss () const
|
||||
{
|
||||
return (m_shadowingValue);
|
||||
}
|
||||
|
||||
Ptr<MobilityModel>
|
||||
BuildingsPropagationLossModel::ShadowingLoss::GetReceiver () const
|
||||
{
|
||||
return m_receiver;
|
||||
}
|
||||
|
||||
TypeId
|
||||
BuildingsPropagationLossModel::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BuildingsPropagationLossModel")
|
||||
|
||||
.SetParent<PropagationLossModel> ()
|
||||
|
||||
|
||||
.AddAttribute ("ShadowSigmaOutdoor",
|
||||
"Standard deviation of the normal distribution used for calculate the shadowing for outdoor nodes",
|
||||
DoubleValue (7.0),
|
||||
MakeDoubleAccessor (&BuildingsPropagationLossModel::m_shadowingSigmaOutdoor),
|
||||
MakeDoubleChecker<double> ())
|
||||
|
||||
.AddAttribute ("ShadowSigmaIndoor",
|
||||
"Standard deviation of the normal distribution used for calculate the shadowing for indoor nodes ",
|
||||
DoubleValue (8.0),
|
||||
MakeDoubleAccessor (&BuildingsPropagationLossModel::m_shadowingSigmaIndoor),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("ShadowSigmaExtWalls",
|
||||
"Standard deviation of the normal distribution used for calculate the shadowing due to ext walls ",
|
||||
DoubleValue (5.0),
|
||||
MakeDoubleAccessor (&BuildingsPropagationLossModel::m_shadowingSigmaExtWalls),
|
||||
MakeDoubleChecker<double> ())
|
||||
|
||||
.AddAttribute ("InternalWallLoss",
|
||||
"Additional loss for each internal wall [dB]",
|
||||
DoubleValue (5.0),
|
||||
MakeDoubleAccessor (&BuildingsPropagationLossModel::m_lossInternalWall),
|
||||
MakeDoubleChecker<double> ());
|
||||
|
||||
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::ExternalWallLoss (Ptr<BuildingsMobilityModel> a) const
|
||||
{
|
||||
double loss = 0.0;
|
||||
Ptr<Building> aBuilding = a->GetBuilding ();
|
||||
if (aBuilding->GetExtWallsType () == Building::Wood)
|
||||
{
|
||||
loss = 4;
|
||||
}
|
||||
else if (aBuilding->GetExtWallsType () == Building::ConcreteWithWindows)
|
||||
{
|
||||
loss = 7;
|
||||
}
|
||||
else if (aBuilding->GetExtWallsType () == Building::ConcreteWithoutWindows)
|
||||
{
|
||||
loss = 15; // 10 ~ 20 dB
|
||||
}
|
||||
else if (aBuilding->GetExtWallsType () == Building::StoneBlocks)
|
||||
{
|
||||
loss = 12;
|
||||
}
|
||||
return (loss);
|
||||
}
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::HeightLoss (Ptr<BuildingsMobilityModel> node) const
|
||||
{
|
||||
double loss = 0.0;
|
||||
|
||||
int nfloors = node->GetFloorNumber () - 1;
|
||||
loss = -2 * (nfloors);
|
||||
return (loss);
|
||||
}
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::InternalWallsLoss (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel>b) const
|
||||
{
|
||||
// approximate the number of internal walls with the Manhattan distance in "rooms" units
|
||||
double dx = abs (a->GetRoomNumberX () - b->GetRoomNumberX ());
|
||||
double dy = abs (a->GetRoomNumberY () - b->GetRoomNumberY ());
|
||||
return m_lossInternalWall * (dx+dy);
|
||||
}
|
||||
|
||||
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::GetShadowing (Ptr<MobilityModel> a, Ptr<MobilityModel> b)
|
||||
const
|
||||
{
|
||||
Ptr<BuildingsMobilityModel> a1 = DynamicCast<BuildingsMobilityModel> (a);
|
||||
Ptr<BuildingsMobilityModel> b1 = DynamicCast<BuildingsMobilityModel> (b);
|
||||
NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "BuildingsPropagationLossModel only works with BuildingsMobilityModel");
|
||||
|
||||
std::map<Ptr<MobilityModel>, std::map<Ptr<MobilityModel>, ShadowingLoss> >::iterator ait = m_shadowingLossMap.find (a);
|
||||
if (ait != m_shadowingLossMap.end ())
|
||||
{
|
||||
std::map<Ptr<MobilityModel>, ShadowingLoss>::iterator bit = ait->second.find (b);
|
||||
if (bit != ait->second.end ())
|
||||
{
|
||||
return (bit->second.GetLoss ());
|
||||
}
|
||||
else
|
||||
{
|
||||
double sigma = EvaluateSigma (a1, b1);
|
||||
// side effect: will create new entry
|
||||
ait->second[b] = ShadowingLoss (0.0, sigma, b);
|
||||
return (ait->second[b].GetLoss ());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
double sigma = EvaluateSigma (a1, b1);
|
||||
// side effect: will create new entries in both maps
|
||||
m_shadowingLossMap[a][b] = ShadowingLoss (0.0, sigma, b);
|
||||
return (m_shadowingLossMap[a][b].GetLoss ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::EvaluateSigma (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> b)
|
||||
const
|
||||
{
|
||||
if (a->IsOutdoor ())
|
||||
{
|
||||
if (b->IsOutdoor ())
|
||||
{
|
||||
return (m_shadowingSigmaOutdoor);
|
||||
}
|
||||
else
|
||||
{
|
||||
double sigma = sqrt ((m_shadowingSigmaOutdoor * m_shadowingSigmaOutdoor) + (m_shadowingSigmaExtWalls * m_shadowingSigmaExtWalls));
|
||||
return (sigma);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (b->IsIndoor ())
|
||||
{
|
||||
return (m_shadowingSigmaIndoor);
|
||||
}
|
||||
else
|
||||
{
|
||||
double sigma = sqrt ((m_shadowingSigmaOutdoor * m_shadowingSigmaOutdoor) + (m_shadowingSigmaExtWalls * m_shadowingSigmaExtWalls));
|
||||
return (sigma);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
BuildingsPropagationLossModel::DoCalcRxPower (double txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) const
|
||||
{
|
||||
return txPowerDbm - GetLoss (a, b) - GetShadowing (a, b);
|
||||
}
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
@@ -0,0 +1,106 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
* Nicola Baldo <nbaldo@cttc.es>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BUILDINGS_PROPAGATION_LOSS_MODEL_H_
|
||||
#define BUILDINGS_PROPAGATION_LOSS_MODEL_H_
|
||||
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/propagation-loss-model.h"
|
||||
#include <ns3/building.h>
|
||||
#include <ns3/buildings-mobility-model.h>
|
||||
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class ShadowingLossModel;
|
||||
class JakesFadingLossModel;
|
||||
|
||||
/**
|
||||
* \ingroup propagation
|
||||
*
|
||||
* This model provides means for simulating the following propagation
|
||||
* phenomena in the presence of buildings:
|
||||
*
|
||||
* - shadowing (indoor, outdoor)
|
||||
* - external wall penetration loss
|
||||
* - internal wall penetration loss
|
||||
*
|
||||
* The distance-dependent component of propagation loss is deferred
|
||||
* to derived classes which are expected to implement the GetLoss method.
|
||||
*
|
||||
* \warning This model works only with BuildingsMobilityModel
|
||||
*
|
||||
*/
|
||||
|
||||
class BuildingsPropagationLossModel : public PropagationLossModel
|
||||
{
|
||||
|
||||
public:
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
/**
|
||||
* \param a the mobility model of the source
|
||||
* \param b the mobility model of the destination
|
||||
* \returns the propagation loss (in dBm)
|
||||
*/
|
||||
virtual double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
|
||||
|
||||
// inherited from PropagationLossModel
|
||||
virtual double DoCalcRxPower (double txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
|
||||
|
||||
protected:
|
||||
|
||||
double ExternalWallLoss (Ptr<BuildingsMobilityModel> a) const;
|
||||
double HeightLoss (Ptr<BuildingsMobilityModel> n) const;
|
||||
double InternalWallsLoss (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> b) const;
|
||||
|
||||
double GetShadowing (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
|
||||
|
||||
double m_lossInternalWall; // in meters
|
||||
|
||||
|
||||
class ShadowingLoss
|
||||
{
|
||||
public:
|
||||
ShadowingLoss ();
|
||||
ShadowingLoss (double mean, double sigma, Ptr<MobilityModel> receiver);
|
||||
double GetLoss () const;
|
||||
Ptr<MobilityModel> GetReceiver (void) const;
|
||||
protected:
|
||||
Ptr<MobilityModel> m_receiver;
|
||||
NormalVariable m_randVariable;
|
||||
double m_shadowingValue;
|
||||
};
|
||||
|
||||
mutable std::map<Ptr<MobilityModel>, std::map<Ptr<MobilityModel>, ShadowingLoss> > m_shadowingLossMap;
|
||||
double EvaluateSigma (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> b) const;
|
||||
|
||||
|
||||
double m_shadowingSigmaExtWalls;
|
||||
double m_shadowingSigmaOutdoor;
|
||||
double m_shadowingSigmaIndoor;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* BUILDINGS_PROPAGATION_LOSS_MODEL_H_ */
|
||||
@@ -0,0 +1,291 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Marco Miozzo <marco.miozzo@cttc.es>
|
||||
* Nicola Baldo <nbaldo@cttc.es>
|
||||
*
|
||||
*/
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/mobility-model.h"
|
||||
#include "ns3/double.h"
|
||||
#include "ns3/pointer.h"
|
||||
#include "ns3/okumura-hata-propagation-loss-model.h"
|
||||
#include "ns3/itu-r-1411-los-propagation-loss-model.h"
|
||||
#include "ns3/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h"
|
||||
#include "ns3/itu-r-1238-propagation-loss-model.h"
|
||||
#include "ns3/kun-2600-mhz-propagation-loss-model.h"
|
||||
#include "ns3/buildings-mobility-model.h"
|
||||
#include "ns3/enum.h"
|
||||
|
||||
#include "hybrid-buildings-propagation-loss-model.h"
|
||||
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("HybridBuildingsPropagationLossModel");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (HybridBuildingsPropagationLossModel);
|
||||
|
||||
|
||||
|
||||
HybridBuildingsPropagationLossModel::HybridBuildingsPropagationLossModel ()
|
||||
{
|
||||
m_okumuraHata = CreateObject<OkumuraHataPropagationLossModel> ();
|
||||
m_ituR1411Los = CreateObject<ItuR1411LosPropagationLossModel> ();
|
||||
m_ituR1411NlosOverRooftop = CreateObject<ItuR1411NlosOverRooftopPropagationLossModel> ();
|
||||
m_ituR1238 = CreateObject<ItuR1238PropagationLossModel> ();
|
||||
m_kun2600Mhz = CreateObject<Kun2600MhzPropagationLossModel> ();
|
||||
}
|
||||
|
||||
HybridBuildingsPropagationLossModel::~HybridBuildingsPropagationLossModel ()
|
||||
{
|
||||
}
|
||||
|
||||
TypeId
|
||||
HybridBuildingsPropagationLossModel::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::HybridBuildingsPropagationLossModel")
|
||||
|
||||
.SetParent<BuildingsPropagationLossModel> ()
|
||||
|
||||
.AddConstructor<HybridBuildingsPropagationLossModel> ()
|
||||
|
||||
.AddAttribute ("Frequency",
|
||||
"The Frequency (default is 2.106 GHz).",
|
||||
DoubleValue (2160e6),
|
||||
MakeDoubleAccessor (&HybridBuildingsPropagationLossModel::SetFrequency),
|
||||
MakeDoubleChecker<double> ())
|
||||
|
||||
.AddAttribute ("Los2NlosThr",
|
||||
" Threshold from LoS to NLoS in ITU 1411 [m].",
|
||||
DoubleValue (200.0),
|
||||
MakeDoubleAccessor (&HybridBuildingsPropagationLossModel::m_itu1411NlosThreshold),
|
||||
MakeDoubleChecker<double> ())
|
||||
|
||||
.AddAttribute ("Environment",
|
||||
"Environment Scenario",
|
||||
EnumValue (UrbanEnvironment),
|
||||
MakeEnumAccessor (&HybridBuildingsPropagationLossModel::SetEnvironment),
|
||||
MakeEnumChecker (UrbanEnvironment, "Urban",
|
||||
SubUrbanEnvironment, "SubUrban",
|
||||
OpenAreasEnvironment, "OpenAreas"))
|
||||
|
||||
.AddAttribute ("CitySize",
|
||||
"Dimension of the city",
|
||||
EnumValue (LargeCity),
|
||||
MakeEnumAccessor (&HybridBuildingsPropagationLossModel::SetCitySize),
|
||||
MakeEnumChecker (SmallCity, "Small",
|
||||
MediumCity, "Medium",
|
||||
LargeCity, "Large"))
|
||||
|
||||
.AddAttribute ("RooftopLevel",
|
||||
"The height of the rooftop level in meters",
|
||||
DoubleValue (20.0),
|
||||
MakeDoubleAccessor (&HybridBuildingsPropagationLossModel::SetRooftopHeight),
|
||||
MakeDoubleChecker<double> (0.0, 90.0))
|
||||
|
||||
;
|
||||
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
HybridBuildingsPropagationLossModel::SetEnvironment (EnvironmentType env)
|
||||
{
|
||||
m_okumuraHata->SetAttribute ("Environment", EnumValue (env));
|
||||
m_ituR1411NlosOverRooftop->SetAttribute ("Environment", EnumValue (env));
|
||||
}
|
||||
|
||||
void
|
||||
HybridBuildingsPropagationLossModel::SetCitySize (CitySize size)
|
||||
{
|
||||
m_okumuraHata->SetAttribute ("CitySize", EnumValue (size));
|
||||
m_ituR1411NlosOverRooftop->SetAttribute ("CitySize", EnumValue (size));
|
||||
}
|
||||
|
||||
void
|
||||
HybridBuildingsPropagationLossModel::SetFrequency (double freq)
|
||||
{
|
||||
m_okumuraHata->SetAttribute ("Frequency", DoubleValue (freq));
|
||||
m_ituR1411Los->SetAttribute ("Frequency", DoubleValue (freq));
|
||||
m_ituR1411NlosOverRooftop->SetAttribute ("Frequency", DoubleValue (freq));
|
||||
m_ituR1238->SetAttribute ("Frequency", DoubleValue (freq));
|
||||
m_frequency = freq;
|
||||
}
|
||||
|
||||
void
|
||||
HybridBuildingsPropagationLossModel::SetRooftopHeight (double rooftopHeight)
|
||||
{
|
||||
m_rooftopHeight = rooftopHeight;
|
||||
m_ituR1411NlosOverRooftop->SetAttribute ("RooftopLevel", DoubleValue (rooftopHeight));
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
HybridBuildingsPropagationLossModel::GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const
|
||||
{
|
||||
NS_ASSERT_MSG ((a->GetPosition ().z >= 0) && (b->GetPosition ().z >= 0), "HybridBuildingsPropagationLossModel does not support underground nodes (placed at z < 0)");
|
||||
|
||||
|
||||
double distance = a->GetDistanceFrom (b);
|
||||
|
||||
// get the BuildingsMobilityModel pointers
|
||||
Ptr<BuildingsMobilityModel> a1 = DynamicCast<BuildingsMobilityModel> (a);
|
||||
Ptr<BuildingsMobilityModel> b1 = DynamicCast<BuildingsMobilityModel> (b);
|
||||
NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "HybridBuildingsPropagationLossModel only works with BuildingsMobilityModel");
|
||||
|
||||
double loss = 0.0;
|
||||
|
||||
if (a1->IsOutdoor ())
|
||||
{
|
||||
if (b1->IsOutdoor ())
|
||||
{
|
||||
if (distance > 1000)
|
||||
{
|
||||
NS_LOG_INFO (this << a1->GetPosition ().z << b1->GetPosition ().z << m_rooftopHeight);
|
||||
if ((a1->GetPosition ().z < m_rooftopHeight)
|
||||
&& (b1->GetPosition ().z < m_rooftopHeight))
|
||||
{
|
||||
loss = ItuR1411 (a1, b1);
|
||||
NS_LOG_INFO (this << " 0-0 (>1000): below rooftop -> ITUR1411 : " << loss);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Over the rooftop tranmission -> Okumura Hata
|
||||
loss = OkumuraHata (a1, b1);
|
||||
NS_LOG_INFO (this << " O-O (>1000): above rooftop -> OH : " << loss);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// short range outdoor communication
|
||||
loss = ItuR1411 (a1, b1);
|
||||
NS_LOG_INFO (this << " 0-0 (<1000) Street canyon -> ITUR1411 : " << loss);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// b indoor
|
||||
if (distance > 1000)
|
||||
{
|
||||
if ((a1->GetPosition ().z < m_rooftopHeight)
|
||||
&& (b1->GetPosition ().z < m_rooftopHeight))
|
||||
{
|
||||
loss = ItuR1411 (a1, b1) + ExternalWallLoss (b1) + HeightLoss (a1);
|
||||
NS_LOG_INFO (this << " 0-I (>1000): below rooftop -> ITUR1411 : " << loss);
|
||||
}
|
||||
else
|
||||
{
|
||||
loss = OkumuraHata (a1, b1) + ExternalWallLoss (b1);
|
||||
NS_LOG_INFO (this << " O-I (>1000): above the rooftop -> OH : " << loss);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
loss = ItuR1411 (a1, b1) + ExternalWallLoss (b1) + HeightLoss (b1);
|
||||
NS_LOG_INFO (this << " 0-I (<1000) ITUR1411 + BEL : " << loss);
|
||||
}
|
||||
} // end b1->isIndoor ()
|
||||
}
|
||||
else
|
||||
{
|
||||
// a is indoor
|
||||
if (b1->IsIndoor ())
|
||||
{
|
||||
if (a1->GetBuilding () == b1->GetBuilding ())
|
||||
{
|
||||
// nodes are in same building -> indoor communication ITU-R P.1238
|
||||
loss = ItuR1238 (a1, b1) + InternalWallsLoss (a1, b1);;
|
||||
NS_LOG_INFO (this << " I-I (same building) ITUR1238 : " << loss);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// nodes are in different buildings
|
||||
loss = ItuR1411 (a1, b1) + ExternalWallLoss (a1) + ExternalWallLoss (b1);
|
||||
NS_LOG_INFO (this << " I-I (different) ITUR1238 + 2*BEL : " << loss);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// b is outdoor
|
||||
if (distance > 1000)
|
||||
{
|
||||
if ((a1->GetPosition ().z < m_rooftopHeight)
|
||||
&& (b1->GetPosition ().z < m_rooftopHeight))
|
||||
{
|
||||
loss = ItuR1411 (a1, b1) + ExternalWallLoss (a1) + HeightLoss (a1);
|
||||
NS_LOG_INFO (this << " I-O (>1000): down rooftop -> ITUR1411 : " << loss);
|
||||
}
|
||||
else
|
||||
{
|
||||
// above rooftop -> OH
|
||||
loss = OkumuraHata (a1, b1) + ExternalWallLoss (a1) + HeightLoss (a1);
|
||||
NS_LOG_INFO (this << " =I-O (>1000) over rooftop OH + BEL + HG: " << loss);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
loss = ItuR1411 (a1, b1) + ExternalWallLoss (a1) + HeightLoss (a1);
|
||||
NS_LOG_INFO (this << " I-O (<1000) ITUR1411 + BEL + HG: " << loss);
|
||||
}
|
||||
} // end b1->IsIndoor ()
|
||||
} // end a1->IsOutdoor ()
|
||||
|
||||
loss = std::max (loss, 0.0);
|
||||
|
||||
return loss;
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
HybridBuildingsPropagationLossModel::OkumuraHata (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> b) const
|
||||
{
|
||||
if (m_frequency <= 2.3e9)
|
||||
{
|
||||
return m_okumuraHata->GetLoss (a, b);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_kun2600Mhz->GetLoss (a, b);
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
HybridBuildingsPropagationLossModel::ItuR1411 (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> b) const
|
||||
{
|
||||
if (a->GetDistanceFrom (b) < m_itu1411NlosThreshold)
|
||||
{
|
||||
return (m_ituR1411Los->GetLoss (a, b));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (m_ituR1411NlosOverRooftop->GetLoss (a, b));
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
HybridBuildingsPropagationLossModel::ItuR1238 (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> b) const
|
||||
{
|
||||
return m_ituR1238->GetLoss (a,b);
|
||||
}
|
||||
|
||||
|
||||
} // namespace ns3
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user